Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.8.1
.NET Platform

View Docs for Another
Version or Platform

Programmer's Reference > WordApplication API > Element > InsertMergeFieldBefore

InsertMergeFieldBefore Method



Signature:

public MergeField InsertMergeFieldBefore ( String fieldName , String display )

Description:

Creates and returns a MergeField at the beginning of this Element. This merge field will have the specified name and contents.

Parameters:

fieldName     A String representing the name of this merge field.
display     A String representing the text that will displayed for this merge field in the document.

Returns:

MergeField A MergeField object representing the newly created merge field.

Exceptions:

System.Exception    

Examples:

[csharp]
MergeField mfield = e.InsertMergeFieldBefore("MyField", "ThisNameIsDisplayed");
[vbnet]
Dim mfield As MergeField = e.InsertMergeFieldBefore("MyField", "ThisNameIsDisplayed")



Copyright 2007 © SoftArtisans, Inc. All Rights Reserved.