Comments (5)
That did it. Thanks!
It took some time to make a paragraph style look and act like the table cell I was actually working with (it had some shading, padding, and an image to deal with), but once I got all of the settings just right, it worked like a charm.
from officer.
unfortunately, I can't reproduce without template.docx.
If your have read the code, I am sure you saw that this error is raised in the code. If you set the bookmark in the paragraph (just set it at the beginning of the paragraph for example) and NOT on the whole paragraph, it will work. I will make a additionnal note for that in the documentation. For now, it's only documented in ReporteRs (the old version): https://davidgohel.github.io/ReporteRs/articles/bookmarks.html#declare-bookmark-in-word
from officer.
To follow-up, I looked at the formatting marks contained in my template document after seeing the documentation you linked to. In doing so, I realized it's the fact that my text is in a table cell that seems to be the root of my problems. There is an end-of-cell marker at the end of the text I'm trying to modify instead of a plain paragraph mark. Here is a simplified version of my template document for reference: template.docx.
Is there a way to set a bookmark in a table cell or otherwise modify the text in a table cell?
from officer.
To summarize, I understand you want a table because you want to add borders around a paragraph, right?
If it's the case, you could add a paragraph with a style that has borders, the rendering is the same.
from officer.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from officer.
Related Issues (20)
- Support for run_autonum in quarto HOT 5
- problem with function : body_add_docx HOT 2
- Word reports an error, if you use a Chinese file name with function `body_add_docx` HOT 7
- Figure and table titles integration in a new Word document HOT 2
- Cursor_bookmark() looks inoperant in v0.6.2 HOT 2
- Allow interpolation of fp_text styled text with other text using glue HOT 4
- Deleting media / notes
- Add option to specify `seq_id` to `body_add_toc()` to generate "Table of Tables" and "Table of Figures" HOT 2
- body_add_docx() overrides bookmarks of the second document HOT 1
- Add tables or figures to an excel workbook HOT 2
- Unable to save a pptx (that was originally downloaded from google drive) HOT 1
- Replacing bkm with flextable within textbox remove textbox HOT 2
- fpar( external_img() ) causes an error: linecmpd must be one of 'sng', 'dbl', 'tri', 'thinThick', 'thickThin' HOT 3
- Applying styles to parts of a table that was added via `body_add_table(style = ...)` HOT 3
- Content cannot be displayed when opened with software other than Microsoft Office HOT 1
- Unexpected behaviour from function ph_remove. Not removing the shape passed in ph_label parameter HOT 1
- docx_summary() function doesn't work after caption insertion HOT 1
- body_add_docx() doesn't work if file path for src contains & HOT 2
- `fp_text_lite()` doesn't work with `shading.color` HOT 1
- `cursor_bookmark` is no longer working as expected for inserting text in tables HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from officer.