| WrdInsertBookmark {DescTools} | R Documentation |
WrdInsertBookmark inserts a new bookmark in a Word document. WrdGotoBookmark allows to set the cursor on the bookmark and WrdUpdateBookmark sets the text within the range of the bookmark.
WrdInsertBookmark(name, wrd = DescToolsOptions("lastWord"))
WrdGoto(name, what = wdConst$wdGoToBookmark, wrd = DescToolsOptions("lastWord"))
WrdUpdateBookmark(name, text, what = wdConst$wdGoToBookmark,
wrd = DescToolsOptions("lastWord"))
name |
the name of the bookmark. |
text |
the text of the bookmark. |
what |
a word constant, defining the type of object to be used to place the cursor. |
wrd |
the pointer to a word instance. Can be a new one, created by |
Bookmarks are useful to build structured documents, which can be updated later.
Andri Signorell <andri@signorell.net>
WrdFont, WrdPlot, GetNewWrd, GetCurrWrd
## Not run: # Windows-specific example
wrd <- GetNewWrd()
WrdText("a)\n\n\nb)", fontname=WrdGetFont()$name, fontsize=WrdGetFont()$size)
WrdInsertBookmark("chap_b")
WrdText("\n\n\nc)\n\n\n", fontname=WrdGetFont()$name, fontsize=WrdGetFont()$size)
WrdGoto("chap_b")
WrdUpdateBookmark("chap_b", "Goto chapter B and set text")
## End(Not run)