Word computed fields in a table #694
-
|
I'd like to include a paragraph containing a Word computed field inside a table. Is that possible somehow? Some failed attempts: library(officer)
library(flextable)
library(tibble) # For sane creation of list columns.
page_par <- fpar("Page ", run_word_field("PAGE"))
read_docx() |>
body_add_fpar(page_par) |>
body_add_table(
tibble(page_info = list(page_par))
) |>
body_add_flextable(
tibble(page_info = list(page_par)) |> flextable()
) |>
print(target = "foo.docx")
browseURL("foo.docx")
# unlink("foo.docx") |
Beta Was this translation helpful? Give feedback.
Answered by
davidgohel
Aug 12, 2025
Replies: 1 comment 1 reply
-
|
Yes, This is the documentation https://davidgohel.github.io/flextable/reference/as_word_field.html and a copy of an example of this help page: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
davidgohel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes,
This is the documentation https://davidgohel.github.io/flextable/reference/as_word_field.html
and a copy of an example of this help page: