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 / Modules / DAO / VBA / April 2007

Tip: Looking for answers? Try searching our database.

call Word document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
smk23 - 26 Aug 2005 12:31 GMT
Is is possible to call and print a Word document (template) from Access using
vba?
Thanks
Signature

sam

Ofer - 26 Aug 2005 12:59 GMT
To open a word document, create reference to Microsoft Word and then

Function Open_WordDoc()

Dim objWord As Word.Application
Dim objDoc  As Word.Document
Dim DocPath As String

DocPath = "Path and name of the document"

Set objWord = New Word.Application
Set objDoc = objWord.Documents.Open(DocPath)

objDoc.Activate  
objDoc.PrintOut   ' To print out
objWord.Visible = True  ' To display

End Function

> Is is possible to call and print a Word document (template) from Access using
> vba?
> Thanks
snaggy^^ - 10 Feb 2007 14:41 GMT
How can I make this work in access 2007? The object Word.application doesn't
work anymore, does it?

> To open a word document, create reference to Microsoft Word and then
>
[quoted text clipped - 18 lines]
> > vba?
> > Thanks
Sasquatch - 04 Apr 2007 15:06 GMT
From the VBA code window in Access you have to go to "Tools / References..."
and add the reference to the "Microsoft Word x.0 Object Library" before you
can declare the Word.Application object.

I'm using Office XP so my reference to the 10.0 Object Library, so I assume
Office 2003 is 11.0 and Office 2007 is 12.0

> How can I make this work in access 2007? The object Word.application doesn't
> work anymore, does it?
 
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.