Not sure where to put this so here it goes, Yes it is the wonderful me again and once again I hit a little wall. :banghead:
I have a basic button, the button opens a word document
(Code here)
Now the document is a mail merge file to print labels. it works of a query from the same DB and when I open the file on it's own it prompts to update/run the SQL Query and all is fine.
However when I use the button, the file opens but no prompts and the mail merge filters are greyed out (basically as if it hasn't had a source selected
Any advice on this one?
I have a basic button, the button opens a word document
(Code here)
Code:
Private Sub Letter1label_Click()
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "X:\Access Database - XXXX XXXXX\Letter 1.docx"
If Dir(LWordDoc) = "" Then
MsgBox "Labels 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
End Sub
Now the document is a mail merge file to print labels. it works of a query from the same DB and when I open the file on it's own it prompts to update/run the SQL Query and all is fine.
However when I use the button, the file opens but no prompts and the mail merge filters are greyed out (basically as if it hasn't had a source selected
Any advice on this one?