Post Type: Question Category: Lotus Script Domino Version: I have the following code which creates a Word object. Before the object is printed via Call officeMainDoc.PrintOut(True)
I'd like to present the user with a dialog asking them to set which printer they would like to use. This is not printing from Notes - it's printing from Word, so changing the Notes default printer doesn't help.
Any ideas are greatly appreciated!
Thanks,
Jason Collier
Sub Initialize
Dim officeApp As Variant
Dim officeMainDoc As Variant
Dim officeSel As Variant
Dim officeFields As Variant
Dim x As Integer
Dim domDoc As NotesDocument
Dim domColl As NotesDocumentCollection
Dim domSes As New NotesSession
Dim domDb As NotesDatabase
Dim destination As String
Set destination="C:\main.doc"
'For Word 97
'Set officeApp = CreateObject("Word.Application.8")
'For Word 2000
Set officeApp = CreateObject("Word.Application.9")
'Insantatiate the copy
Set officeMainDoc = officeApp.Documents.Open(destination)
Set officeFields = officeMainDoc.FormFields
While Not (domDoc Is Nothing)
With domDoc
officeFields.Item("My_Name").Result=.My_Name(0)
End With
' Print-out
Call officeMainDoc.PrintOut(True)
Set domDoc = domColl.GetNextDocument(domDoc)
Wend
' Quit Application / Close the connection
' Wait for all print jobs to finish
Print "Waiting for print jobs. No. of pending print jobs: " & Cstr(officeApp.BackgroundPrintingStatus)
While officeApp.BackgroundPrintingStatus > 0
' Wait
Wend
Print " " ' to delete the earlier print sentence
Call officeMainDoc.Save
Call officeApp.Quit(False)
End Sub
[ Comment, Edit or Article Submission ]