EnumTextObj Method

[Top]  [Chapter]  [Previous]  [Next]

Declaration

int EnumTextObj([In] TextObjTypes ObjType, [In] bool OnlyActiveText, [In] string NameStartsWith, [In] int EventParam);

Description

This method allows it to check and modify all text objects in the current document. Such text objects are the tags for bookmarks, hyperlinks, mail merge fields and also embedded images and text object fields.

 

The event OnEnumTextObj is triggered for each objects which meets the specified criteria. This event received an IWPTextObj interface which let you modify the the object.

 

Parameters

ObjType

You can set this parameter to 0 to report all objects or use the object type ids, 1=fields, 2=hyperlinks, 3=bookmarks, 7=text object, 8=page reference, 11=footnote, 12=image or text box and 13 for horizontal lines.

OnlyActiveText

If true only check objects in the active text (header/footer, text body)

NameStartsWith

Only objects which name starts with this string will be reported. This is useful to enumerate a group of merge fields, for example to select all fields for a certain database.

EventParam

This value will be passed through to the event handler.

Category

Callback Functions


[idh_iwpmemo_enumtextobj.htm]    Copyright © 2007 by WPCubed GmbH