IWPCharacterAttr SpecialTextAttr[]

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

These interfaces make it possible to modify the look of "special text".

 

This special text can by hyperlinks, fields, bookmarked text etc.

 

To display all text objects with a yellow background this code can be used:

 

WPDLLInt1.SpecialTextAttr(

     SpecialTextSel.wpFieldTextObjects).BackgroundColor = WPDLLInt1.ToRGB(Color.Yellow);

 

This code displays the hyperlinks underlined with a red background:

 

WPDLLInt1.SpecialTextAttr(SpecialTextSel.wpHyperlink).Underline =  ThreeState.tsFalse;

WPDLLInt1.SpecialTextAttr(SpecialTextSel.wpHyperlink).BackgroundColor = WPDLLInt1.ToRGB(Color.Red);

 

public enum SpecialTextSel

{

 wpHiddenText, // text which is hidden (RTF \v)

 wpFootnote, // footnote numbers

 wpInsertpoints, // start and end markers of mail merge fields

 wpHyperlink, // hyperlinks

 wpSPANStyle, // start/end SPAN objects (used by HTML)

 wpAutomaticText, // the merged text itself (insife merge fields)

 wpProtectedText, // protected text

 wpBookmarkedText, // text within bookmark tags

 wpInsertedText, // not used

 wpDeletedText, // not used

 wpWordHighlight, // not used

 wpFieldTextObjects // field objects, such as a page number

}


[specialtextattr.htm]    Copyright © 2007 by WPCubed GmbH