Hi viselli,
There are a host of ways to do this.
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, "Print", "c:\mypath\mydoc.doc", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
Is one,
Private appWord As Word.Application
Private docToPrint As Word.Document
Private Sub cmdPrintIt_Click()
Set appWord = CreateObject("Word.Applica
Set docToPrint = appWord.Open("c:\mypath\my
docToPrint.PrintOut
docToPrint.Close
appWord.Quit
Set docToPrint = Nothing
Set appWord = Nothing
End Sub
Is another.
Tim Cottee MCSD, MCDBA, CPIM
Brainbench MVP for Visual Basic
http://www.brainbench.com
Experts-Exchange Advisory Board Member
Main Topics
Browse All Topics





by: dragontoothPosted on 2003-06-12 at 08:09:23ID: 8709541
dim WordDoc As Word.Document
WordDoc.PrintOut
This will print out the whole document.
Hope this helps
dragontooth