G
Guest
I have a puzzling issue relating to opening Word documents using code.
I have a control in an Access form that, when double-clicked, takes the
string in the first field of that row, and opens a word document in a
specified folder with the file name [string].doc.
I’ve noticed that the “way†the Word document opens is different, depending
on whether I double-click the actual files in the folder, or use the control
in my Access form. When I simply double-click the files in the folder,
everything opens normally. On the other hand, when I use the Access control,
there are weird menus, and the Word window is minimized. I’m not sure I
understand why.
I’ve pasted below the section of the code that I’m using to open the Word
documents.
I need the Access control to open the Word documents exactly as they would
open up if I just double-clicked those files from their folder. Any idea
what I’m doing wrong, or what I need to do to fix this?
Thanks,
Tom
* * * * * *
Private Sub File_DblClick(Cancel As Integer)
Dim X As Double
X = Shell("C:\Program Files\Microsoft Office\Office10\Winword.exe " &
"""P:\890\Rehearing\Comment Processing\Processing Folder\Filings for
Processing\" & PartyName.Value & ".doc""")
End Sub
I have a control in an Access form that, when double-clicked, takes the
string in the first field of that row, and opens a word document in a
specified folder with the file name [string].doc.
I’ve noticed that the “way†the Word document opens is different, depending
on whether I double-click the actual files in the folder, or use the control
in my Access form. When I simply double-click the files in the folder,
everything opens normally. On the other hand, when I use the Access control,
there are weird menus, and the Word window is minimized. I’m not sure I
understand why.
I’ve pasted below the section of the code that I’m using to open the Word
documents.
I need the Access control to open the Word documents exactly as they would
open up if I just double-clicked those files from their folder. Any idea
what I’m doing wrong, or what I need to do to fix this?
Thanks,
Tom
* * * * * *
Private Sub File_DblClick(Cancel As Integer)
Dim X As Double
X = Shell("C:\Program Files\Microsoft Office\Office10\Winword.exe " &
"""P:\890\Rehearing\Comment Processing\Processing Folder\Filings for
Processing\" & PartyName.Value & ".doc""")
End Sub