I have an Access database with VBA for filling-in a word document in readonly mode. It does work properly in Office 2016 but does not work in O365. In Office 365 the fields remain empty whereas in Office 2016 the data is populated in the fields correctly.
The Word document has to be opened in readonly mode so that the original document cannot be changed.
Does anyone knows this issue or did I miss something?
Here es an example, how I open the word document:
Sub FillIn()
Dim WordApp As Word.Application
Dim Doc As Word.Document
Set WordApp = New Word.Application
WordApp.Visible = True
Set Doc = WordApp.Documents.Open(FileName:="C:\myWordTemplate.docx", ReadOnly:=True)
With Doc
.FormFields("Firstname").Result = Me.Firstname
.FormFields("Lastname").Result = Me.Lastname
End With
End Sub
Thanks for any help