StringValue Property

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

Applies to

IWPFieldContents

Declaration

string StringValue;

Description

This property is used to assign a string to this value to replace the contents of the field. You can also read the field to retrieve the current data. An instance of the interface IWPFieldContents is passed to the event OnFieldGetText after the method MergeText was called.

 

You can also assign a string in RTF or WPT format. HTML will be auto detected if the text starts with <html>.

 

Example:

StringValue = "<html><b>Super</b> mail merge</html>"

This code will insert the text: Super mail merge

 

If you need to create a hyperlink use the method InputHyperlink und set the link text using this property.

Note

If you cannot use the IWPFieldContents interface because of a limitation of the developing language, you can insert text using the method LoadFromString. The input methods of the IWPTextCursor can also be used, only the cursor position or selection may not be changed. In MS-Access™ please define a global variable to hold a IWPFieldContents interface reference. In the event OnFieldGetText assign the "Contents" parameter to that variable.

Category

Mailmerge


[idh_iwpfieldcontents_stringvalue.htm]    Copyright © 2007 by WPCubed GmbH