Current location - Quotes Website - Signature design - How is the spire? Document inserts text in bookmarks? All bookmark names have been obtained.
How is the spire? Document inserts text in bookmarks? All bookmark names have been obtained.
Insert text after the bookmark, and the inserted text is immediately after the bookmark. If you want to enter a new line, you can add "\n" before the text, I hope it will be useful to you.

Use? The spire Doc

Use? The spire Doc. document;

Namespace? Insert text

{

Class? procedure

{

Static electricity Invalid? Main(string[]? Parameter)

{

//Load Word document

Documents? Doctor. =? New? Document ();

Doctor. LoadFromFile(" test . docx ");

//Get the specified bookmark location

BookmarksNavigator? Navigator? =? New? bookmarks navigator(doc);

A navigator. MoveToBookmark ("bookmark");

//Add text after bookmark

A navigator. insert text(" hello ");

//Save the file

Doctor. SaveToFile("output.docx ",file format. docx 20 13);

}

}

}