(Solved) – R Markdown – adding an automatic macro to an MS-word document

  • by
(solved)-–-r-markdown-–-adding-an-automatic-macro-to-an-ms-word-document

I am currently generating word documents with Rmarkdown. But the formating is a bit difficult compared to an HTML output. One of the technical solution I could use would be to add a macro on my word file and make it execute automaticaly on opening.

The following macro should do the trick for automatic execution :

Sub Auto_Open()

Msgbox "Hello World!"

End Sub

How would one adds this macro to the doc knitted with Rmarkdown ? How do one make sure it executes correctly on opening ?

Leave a Reply

Your email address will not be published. Required fields are marked *