Closed behrica closed 7 years ago
Hi,
I will try to make a better vignette soon with more examples.
Hi,
I am facing the same challenge. I need to update captioned figures and tables (identified by a bookmark) in a large word document. For figures this works flawlessly with pot and pot_img and addParagraph. Maybe a pot_flextable function might be another way to go about updating FlexTables? Or are there other plans to support this task?
Hi
From here, it says:
When used with addFlexTable, content (table) will be added after the paragraph containing the bookmark.
You can use deleteBookmarkNextContent(bookmark = 'bookmark_id')
to delete the content after a bookmark (a table in your case), then using addFlexTable(..., bookmark = 'bookmark_id')
and the FlexTable will be added.
The replacement is a two step process:
I understood from here: http://davidgohel.github.io/ReporteRs/articles/bookmarks.html
that addFlexTable() cannot replace content of a bookmark.
But it is not clear to me, if I can do something else to achieve this.
I read about 'deleteBookmarkNextContent', but it is a bit danegrous, if in certain situations the content after the bookmarks is not what I want to delete.
Can I use addParagraph somewhoe to replace a full paragraph (which then contains a Flextable) ?