Top Method Summary
Options Name Purpose
AddPageBreak (Document) Adds a Page Break into the specified document
CloseDocument (WordprocessingDocument) Closes the Document
LOGICAL ContainsBookmarks (WordprocessingDocument) Checks if the document contains bookmarks
CopyFiles (character, character) Copies the TemplateFile File to the SourceFile File
FetchBookmarks (WordprocessingDocument) Fetches all the document bookmarks
FindAndReplaceBookmarks (WordprocessingDocument, Dictionary) Find And Replace Bookmarks
GetDocumentBookmarks (WordprocessingDocument) Gets all Document Bookmarks and stores them in a Dictionary
GetFooterBookmarks (WordprocessingDocument) Gets all Document Footer Bookmarks and stores them in a Dictionary
GetHeaderBookmarks (WordprocessingDocument) Gets all Document Header Bookmarks and stores them in a Dictionary
MergeDocument (WordprocessingDocument, AltChunk, logical) Merges an AltChunk into a specific Document
DocumentFormat.OpenXml.Packaging.WordprocessingDocument OpenDocument (character) Opens the document
DocumentFormat.OpenXml.Packaging.WordprocessingDocument OpenDocument (character, character) Opens the document copied from the template
RemoveBookmarkEnd (character) Removes the Document Bookmark End linked to the specified Bookmark ID
RemoveBookmarkEnds (WordprocessingDocument) Removes all Document Bookmark Ends from the specified Document
SaveDocument (WordprocessingDocument) Saves the Document
UpdateBookmark (WordprocessingDocument, character, character) Updates a specific Document Bookmark
UpdateBookmarkEndList (BookmarkEnd) Update Bookmark End List by inserting the BookmarkEnd and BookmarkId
UpdateBookmarkStartList (BookmarkStart, character) Update Bookmark Start List by inserting the BookmarkStart and BookmarkId
UpdateBookmarkText (BookmarkStart, character) Updates the Bookmark Text
UpdateMergeBookmark (WordprocessingDocument, character, AltChunk) Updates a specific Document Bookmark
UpdateText (Run, character) Updates the Bookmark Run Text Element
LOGICAL UpdateText (Run, character, character) Updates the Text on the Bookmark Run Element
ValidateDocument (WordprocessingDocument) Validate that the document is valid

Top Property Summary
Options Name Purpose
LOGICAL HasBookmarks


Method Detail
Top

AddPageBreak (Document)

/*
Purpose: Adds a Page Break into the specified document
Notes:

Parameters:
poDocument DocumentFormat.OpenXml.Wordprocessing.Document
Top

CloseDocument (WordprocessingDocument)

/*
Purpose: Closes the Document
Notes: Uses the Dispose method to close the WordDocument object and releasing
any resources associated with it.

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

LOGICAL ContainsBookmarks (WordprocessingDocument)

/*
Purpose: Checks if the document contains bookmarks
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Returns LOGICAL
logical
Top

CopyFiles (character, character)

/*
Purpose: Copies the TemplateFile File to the SourceFile File
Notes:

Parameters:
pcTemplateFile CHARACTER
pcSourceFile CHARACTER
Top

FetchBookmarks (WordprocessingDocument)

/*
Purpose: Fetches all the document bookmarks
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

FindAndReplaceBookmarks (WordprocessingDocument, Dictionary)

/*
Purpose: Find And Replace Bookmarks
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
poDictionary System.Collections.Generic.Dictionary
Top

GetDocumentBookmarks (WordprocessingDocument)

/*
Purpose: Gets all Document Bookmarks and stores them in a Dictionary
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

GetFooterBookmarks (WordprocessingDocument)

/*
Purpose: Gets all Document Footer Bookmarks and stores them in a Dictionary
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

GetHeaderBookmarks (WordprocessingDocument)

/*
Purpose: Gets all Document Header Bookmarks and stores them in a Dictionary
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

MergeDocument (WordprocessingDocument, AltChunk, logical)

/*
Purpose: Merges an AltChunk into a specific Document
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
poAltChunk DocumentFormat.OpenXml.Wordprocessing.AltChunk
plPageBreak LOGICAL
Top

DocumentFormat.OpenXml.Packaging.WordprocessingDocument OpenDocument (character)

/*
Purpose: Opens the document
Notes:

Parameters:
pcSourceFile CHARACTER
Returns DocumentFormat.OpenXml.Packaging.WordprocessingDocument
WordprocessingDocument
Top

DocumentFormat.OpenXml.Packaging.WordprocessingDocument OpenDocument (character, character)

/*
Purpose: Opens the document copied from the template
Notes:

Parameters:
pcTemplateFile CHARACTER
pcSourceFile CHARACTER
Returns DocumentFormat.OpenXml.Packaging.WordprocessingDocument
WordprocessingDocument
Top

RemoveBookmarkEnd (character)

/*
Purpose: Removes the Document Bookmark End linked to the specified Bookmark ID
Notes:

Parameters:
pcBookmarkID CHARACTER
Top

RemoveBookmarkEnds (WordprocessingDocument)

/*
Purpose: Removes all Document Bookmark Ends from the specified Document
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

SaveDocument (WordprocessingDocument)

/*
Purpose: Saves the Document
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Top

UpdateBookmark (WordprocessingDocument, character, character)

/*
Purpose: Updates a specific Document Bookmark
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
pcBookmarkName CHARACTER
pcBookmarkText CHARACTER
Top

UpdateBookmarkEndList (BookmarkEnd)

/*
Purpose: Update Bookmark End List by inserting the BookmarkEnd and BookmarkId
Notes:

Parameters:
poBookmarkEnd DocumentFormat.OpenXml.Wordprocessing.BookmarkEnd
Top

UpdateBookmarkStartList (BookmarkStart, character)

/*
Purpose: Update Bookmark Start List by inserting the BookmarkStart and BookmarkId
Notes:

Parameters:
poBookmarkStart DocumentFormat.OpenXml.Wordprocessing.BookmarkStart
pcBookmarkId CHARACTER
Top

UpdateBookmarkText (BookmarkStart, character)

/*
Purpose: Updates the Bookmark Text
Notes:

Parameters:
poBookmarkStart DocumentFormat.OpenXml.Wordprocessing.BookmarkStart
pcBookmarkText CHARACTER
Top

UpdateMergeBookmark (WordprocessingDocument, character, AltChunk)

/*
Purpose: Updates a specific Document Bookmark
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument
pcBookmarkName CHARACTER
poAltChunk DocumentFormat.OpenXml.Wordprocessing.AltChunk
Top

UpdateText (Run, character)

/*
Purpose: Updates the Bookmark Run Text Element
Notes: Updates a Bookmark with the required text

Parameters:
poRun DocumentFormat.OpenXml.Wordprocessing.Run
pcBookmarkText CHARACTER
Top

LOGICAL UpdateText (Run, character, character)

/*
Purpose: Updates the Text on the Bookmark Run Element
Notes: Updates a Bookmark with the required text

Parameters:
poRun DocumentFormat.OpenXml.Wordprocessing.Run
pcBookmarkValue CHARACTER
pcBookmarkText CHARACTER
Returns LOGICAL
logical True if the text was updated, false otherwise
Top

ValidateDocument (WordprocessingDocument)

/*
Purpose: Validate that the document is valid
Notes:

Parameters:
poWordDocument DocumentFormat.OpenXml.Packaging.WordprocessingDocument


Property Detail
Top

LOGICAL HasBookmarks


Returns LOGICAL


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       30.03.2026 11:13:42