AUTOMATICALLY printing MS WORD doc from ACCESS

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

Guest

Is there a way to automatically print a word doc using a macro? I tried the
RunApp macro but I don't know what to put on the command line.
 
Ruth,

You can use a RunApp macro to open the Word document. The Command Line
argument will be something like this...
"C:\Program Files\Microsoft Office\...\Winword.exe"
"D:\YourFolder\YourDoc.doc"

However, as far as I know you can't make this print via a macro. You
can use Office Automation code to print the Word document. I think
something like this...
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application­")
WordObj.Documents.Open "C:\YourFolder\YourFile.doc"
WordObj.PrintOut Background:=False
WordObj.Quit False
Set WordObj = Nothing

You would need to set a Reference to the Word Object Library. More
information available at http://support.microsoft.com/?id=154569
 
Steve Schapel said:
Ruth,

You can use a RunApp macro to open the Word document. The Command Line
argument will be something like this...
"C:\Program Files\Microsoft Office\...\Winword.exe"
"D:\YourFolder\YourDoc.doc"

However, as far as I know you can't make this print via a macro. You
can use Office Automation code to print the Word document. I think
something like this...
Dim WordObj As Object
Set WordObj = CreateObject("Word.Application­")
WordObj.Documents.Open "C:\YourFolder\YourFile.doc"
WordObj.PrintOut Background:=False
WordObj.Quit False
Set WordObj = Nothing

You would need to set a Reference to the Word Object Library. More
information available at http://support.microsoft.com/?id=154569
 
Steve,

Are the commands to open MS Word and then to Open the specific document on
two separate command lines or all part of one line? I've tried it both ways
and can't seem to get it to work.

timsken
 
Back
Top