R/wdGoToBookmark.R

wdGoToBookmark <-
function (bookmark, wdapp = .R2wd)
{
    bookmarks<-wdapp[['ActiveDocument']][['Bookmarks']]
    ## locate the bookmark
    ## this is very crude, in principle it should be possible to navigate
    ## directly to the bookmark but I haven't found the right
    ## way of doing it.
    for (i in 1:bookmarks[['Count']]) if (bookmarks$Item(i)[['Name']]==bookmark) break
    bookmarks$Item(i)$Select()
    invisible()
}

Try the R2wd package in your browser

Any scripts or data that you put into this service are public.

R2wd documentation built on May 2, 2019, 8:54 a.m.