I am encountering strange problem when using windows 11 displaying bookmarks in microsoft word from msaccess. Bookmarks simply don't display any data while it does work perfectly when I'm on windows 10. I'm using office 365 here are some snippets of the code:
Dim appWord As Word.Application
Dim doc As Word.Document
Dim x as string
x = "someFoo"
On Error Resume Next Err.Clear
'Set appWord object variable to running instance of Word.
Set appWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then Set appWord = New Word.Application
End
If Set doc = appWord.Documents.Open(Application.CodeProject.Path & "\profile.docx ", , True)
With doc
.FormFields("txtName").Result = x
.Visible = True
.Activate
End With
Set doc = Nothing
Set appWord = Nothing
microsoft word in always prompts in protected view when using windows 11. any solutions?
Dim appWord As Word.Application
Dim doc As Word.Document
Dim x as string
x = "someFoo"
On Error Resume Next Err.Clear
'Set appWord object variable to running instance of Word.
Set appWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then Set appWord = New Word.Application
End
If Set doc = appWord.Documents.Open(Application.CodeProject.Path & "\profile.docx ", , True)
With doc
.FormFields("txtName").Result = x
.Visible = True
.Activate
End With
Set doc = Nothing
Set appWord = Nothing
microsoft word in always prompts in protected view when using windows 11. any solutions?