Open Word Document with Application?

D

davepalmer708

I have created a command button that will open word, but I want it to also
open a specific document in word with this button.
 
A

Arvin Meyer

I have created a command button that will open word, but I want it to also
open a specific document in word with this button.

Have a look at the code at:

http://www.datastrat.com/Code/WordMerge.txt

It not only opens a specific document (which happens to be located in the
same directory as the database, but could be any path) but it also allows a
merge of data to Word bookmarks.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
V

Van T. Dinh

You can use the Shell Method with full-path to WinWord.exe and then full
path to Word doc. For example, the following works in A2K2 on my computer:

Call Shell("""C:\Program Files\Office2K2\Office10\Winword.exe"" " & _
"""C:\Documents and Settings\VanDinh.VTDTEST\My Documents\Test 1.doc""", _
vbNormalFocus)

Note that I have spaces in the path and the full-paths need to be enclosed
in double-quotes.

Alternatively, you can use the FollowHyperlink Method and you only need the
full-path to the Word doc.
 
Top