Printing Word Documents

currie

Registered User.
Local time
Today, 08:11
Joined
Jun 19, 2001
Messages
21
Hi all,

Creating a form that will print various reports and word documents. Is it possible to use a DoCmd (or similar) command to print a Word Document without loading it?

Also, any pointers for creating large (50+ page) reports without using table data? I'd like to convert these word documents into actual reports, but Access doesn't seem to offer a precise and well-formatted way to do so (for example, if someone updated a page, it wouldn't automatically move text to the next page if the first page became larger).


Thanks!


- Ryan
 
The closest I can get to printing a Word document without opening it is to cheat a little by opening it, printing and then closing it using code. Try the following function, you may be able to play with it and make some improvements. It may work just fine if you take the Visible = true line out.

Function about()

Dim objWord As Word.document
On Error GoTo Err_about

Set objWord = GetObject("C:\My Documents\about.doc", "Word.Document")

objWord.Application.Visible = True
objWord.PrintOut
objWord.Close

Exit_about:
Exit Function

Err_about:
MsgBox "This operation cannot be performed." & Chr(13) & "Please notify the Database Administrator."
Resume Exit_about

End Function


Have Fun,

Paul
 
Hi, does anyone know how to change the line spacing on Windows Vista :~ Thanks :D
 

Users who are viewing this thread

Back
Top Bottom