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 / March 2005

Tip: Looking for answers? Try searching our database.

print active document from access vba

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gina - 03 Mar 2005 10:53 GMT
Hi.

Still couldn't solve my absolute path problem I posted earlier this morning.

Now I try to directly print out a word document from within access vba

this is the function I am calling
________________________

Public Function PrintBill()
Dim printedOK As Boolean

Set DC = GetObject(Word.ActiveDocument)

   printedOK = DC.PrintOut(, , , , , , , 2)         ' print 2 of the same
doc
   PrintBill = printedOK
End Function
__________________________

I set the word application visible so I have to go to word and press the
print button manually.

Any help most welcome as I don't have a clou as to what the syntax might be

Thanks,
Gina
Tim Ferguson - 03 Mar 2005 22:55 GMT
> Still couldn't solve my absolute path problem I posted earlier this
> morning.

You can't use a relative path for linked tabledef links. You can get the
folder that the current db is in quite simply though:

 strPath = Left(CurrentDB.Name, _
        Len(CurrentDB.Name) - Len(Dir(CurrentDB.Name)) )

Sorry if you already knew that... :-)

Tim F
Gina - 06 Mar 2005 10:54 GMT
Hi Thim.

Thanks for your answer.

well ... I probably didn't express correctly what I am trying to do

will post a new one on the topic

Gina

> > Still couldn't solve my absolute path problem I posted earlier this
> > morning.
[quoted text clipped - 8 lines]
>
> Tim F
 
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.