Open Word Document with Application?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top