Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2005

Tip: Looking for answers? Try searching our database.

AUTOMATICALLY printing MS WORD doc from ACCESS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ruth - 18 Jun 2005 17:10 GMT
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.
Signature

Ruth

Steve Schapel - 18 Jun 2005 19:38 GMT
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

Signature

Steve Schapel, Microsoft Access MVP

> 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.
Charter Man - 18 Jun 2005 23:11 GMT
> Ruth,
>
[quoted text clipped - 18 lines]
> > 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.
timsken - 31 Jul 2005 23:31 GMT
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

> > Ruth,
> >
[quoted text clipped - 18 lines]
> > > 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.
timsken - 31 Jul 2005 23:36 GMT
Steve,
Actually, never mind... I did get it to work. All on one line. Thanks

Timsken

> Steve,
>
[quoted text clipped - 26 lines]
> > > > 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.