Sub tryAddBmarkatSentence()įor Each MySent In ActiveDocument.Sentencesįor Each bmark In ActiveDocument.BookmarksĪ Name:="pmark" & (wdActiveEndAdjustedPageNumber), Range:=myRange 'bmark name would have added info of page, line, and col number. I've tried a for each loop to attempt each sent in sentences and each bmark in bookmark. My code adds only one bookmark to first sentence and doesn't loop through to end of document. For example, at first sentence would be bookmark "bmarkpg01" and second sentence would be bookmark ""bmarkpg01ln01col01"". Within a Word docx: I'm trying to add a bookmark to each sentence.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |