IWPCharacterAttr Interface

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

Attributes for links and fields


This interface is used to manipulate the appearance of certain "special" text. Such special text are hyperlinks, protected text, field objects and the markers which embedd merged text (=insertpoints).


To change the text which is displayed by start and end markers You can use the method SetCodeText. Use first parameter =1 to change start marker, 2 to change end marker.

Create a merge field:

wpdllInt1.TextCursor.InputField("NAME","WPCubed GmbH",false);


Now change the CodeText to display ( ) signs.




It is also possible to display the name in one of the markers using the string "%N(":

codetext_3 (%N displays the name, %S displays the Source property of the text object, %Y displays the name of the style used by this object, %P displays the Params property.)


Available ids for function SpecialTextAttr:


0 : wpHiddenText - hidden text

1 : wpFootnote - footnote symbols

2 : wpInsertpoints - the star and end markers of merge fields

3 : wpHyperlink - the start and end marker of hyperlinks

4 : wpSPANStyle - the start and end marker of inline SPAN styles

5 : wpAutomaticText - merged text within fields

6 : wpProtectedText - the text which has the protected property

7 : wpBookmarkedText - the text within bookmark objects

8 : wpInsertedText - not used

9 : wpDeletedText - not used

10: wpWordHighlight - highlighted words

11: wpFieldTextObjects - single objects, such as page numbers.









The properties Bold, Italic, StrikeOut, SubScript, SuperScript and Underline use the type ThreeState. It is an enum with this values:

       tsIgnore = 0: do not use the property

       tsTrue   = 1: Swith mode always on

       tsFalse  = 2: Switch this mode always off

[idh_interface_iwpcharacterattr.htm]    Copyright © 2007 by WPCubed GmbH