Click or drag to resize

Document.AddMergeField Method

Add a merge field at selection

Namespace:  SIC.OpenDocumentFormat.MSWord
Assembly:  SIC.OpenDocumentFormat (in SIC.OpenDocumentFormat.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
internal OpenXmlElement AddMergeField(
	ref OpenXmlElement lSelection,
	string pMergeField,
	string pStyle = "",
	bool pNewParagraph = false
)

Parameters

lSelection
Type: OpenXmlElement
Document selection to insert merge field
pMergeField
Type: System.String
Merge field name
pStyle (Optional)
Type: System.String
Style name must exist in document
pNewParagraph (Optional)
Type: System.Boolean
Insert a new paragraph after selection

Return Value

Type: OpenXmlElement
Gives a selection or a paragraph (on parameter pNewParagraph)
See Also