Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Document.FindShapeByWizardTag Method

Office 2007
Returns a ShapeRange object representing one or all of the shapes placed in a publication by a wizard and bearing the specified wizard tag.

Syntax

expression.FindShapeByWizardTag(WizardTag, Instance)

expression   A variable that represents a Document object.

Parameters

NameRequired/OptionalData TypeDescription
WizardTagRequiredPbWizardTagSpecifies the wizard tag for which to search.
InstanceOptionalLongSpecifies which instance of a shape with the specified wizard tag is returned. For Instance equal to n, the nth instance of a shape with the specified wizard tag is returned. If no value for Instance is specified, all the shapes with the specified wizard tag are returned.

Return Value
ShapeRange

Remarks

The WizardTag parameter can be one of the PbWizardTag constants declared in the Microsoft Office Publisher type library.

Example

The following example finds the second instance of a shape with the wizard tag pbWizardDate and assigns it to a variable.

Visual Basic for Applications
Dim shpWizardTag As Shape

Set shpWizardTag = ActiveDocument._
    FindShapeByWizardTag(WizardTag:=pbWizardDate, Instance:=2)



Community Additions

ADD
Show:
© 2015 Microsoft