Shape.AddGuide Method (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Adds a guide to a group shape.

expression .AddGuide(Type, xPos, yPos)

expression A variable that represents a Shape object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Required

Integer

The type of guide to add.

xPos

Required

Double

The x-coordinate of a point on the guide.

yPos

Required

Double

The y-coordinate of a point on the guide.

Return Value

Shape

You can add a guide only to a group shape.

To view guides that you add to a group shape by using the AddGuide method, use the OpenDrawWindow method to open the Group Editing window.

The following constants declared by the Visio type library are valid values for guide types.

Constant

Value

Description

visPoint

1

Guide point

visHorz

2

Horizontal guide

visVert

3

Vertical guide

Show: