Table of contents
Collapse the table of content
Expand the table of content

Document.FindShapeByWizardTag Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

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


expression. FindShapeByWizardTag( WizardTag, Instance)

_expression_A variable that represents a Document object.


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



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


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

Dim shpWizardTag As Shape 

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