Print word document from Access

firework

Registered User.
Local time
Today, 14:45
Joined
Dec 15, 2007
Messages
42
I have a WORD document which should be a standard doc for all project. After printing report for the project in Access, I want the WORD document to be printed at end of report so user could have everything by clicking a button.

How can I trigger to print a WORD doc from Access.

Many thanks
 
first things first

if its a standard doc - then why not make it a report

you can set up a merge to doc should you require - various routes to this - check the samples
 
You could also run a Word macro from Access. Here is some code

Public Sub RunWordMacroOrSub()

'Check Tools/Reference Microsoft Word Object Library
'declare variables
Dim wdApp As Word.Application
Dim wdDoc As Word.Document

'Word application stuff
Set wdApp = New Word.Application
wdApp.Visible = True
Set wdDoc = wdApp.Documents.Open(strFlag) ‘ where strFlag is the File Path

'run the macro
wdApp.Run "MacroName"

'save file
wdDoc.Save

'done
'wdApp.Quit
Set wdDoc = Nothing
Set wdApp = Nothing

End Sub
 
Hi,

Thank you for all your suggestion. Done it in Report. Although I was told it was a standard report contents then contents may be changed. So done it report
 

Users who are viewing this thread

Back
Top Bottom