Hope this is the correct forum. I need to open a word document in Access 2010. The document contains help information and has some screen shots in it. Using the follwing code in "on click" event of a button:
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "x:\ddp\ddp_info\stuff.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
Problem is, word opens but displays the document behind Access, and you can open it by hitting the Windows Icon on the task bar. I need it to opn on top of ACCESS.
Thanks in advance.
jpl
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "x:\ddp\ddp_info\stuff.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
Problem is, word opens but displays the document behind Access, and you can open it by hitting the Windows Icon on the task bar. I need it to opn on top of ACCESS.
Thanks in advance.
jpl