I have previously asked this question on another Access forum, but noone could help. I'm hoping someone here could shed some light on my problem!

I have a Mail Merge letter in Word that gets its information from an Access database.

If I open the Word document manually, I get a message box which says:

Opening this document will run the following SQL command:

SELECT etc...

Data from your database will be placed in the document. Do you want to continue?

[Yes] / [No]
When I select yes, the document opens up on the last record, and I can browse through the records using the navigation controls on the Mail Merge toolbar. This is how I want it to be.

However, I have a form which opens the document using the following code:



Code:
Dim LWorddoc As String
Dim oApp As Object
 
'Path to the word document
LWorddoc = "C:\folderpath\docname.doc"
 
If Dir(LWorddoc) = "" Then
    MsgBox "Document not found."
Else
    'Create an instance of MS Word
    Set oApp = CreateObject(Class:="Word.Application")
    oApp.Visible = True
 
    'Open the Document
    oApp.Documents.Open filename:=LWorddoc
End If
This opens the Word document successfully, again showing the last record. However, the navigation controls (in fact, everything bar Main document setup and Open Data Source) are greyed out. I noticed that it did not pop up the message box about running the SQL command.

How can I get around this?

Thanks in advance for any help offered!