C
Cole
Hello all,
I've got a Word 2003 document that I'm trying to create Word VBA code
for, simply to tell it which printer to go to, and to print Duplex 3
(vertical binder.)
I'm still in the early stages of learning the ropes - so I've been
unable to get a macro to fire off when the document gets opened by
another application, (i.e. sdOffice,) and sdOffice tells Word to
perform a Mail Merge with that doc. This is in a Template document
(.dot extension.) I was hoping that when the Mail Merge happens, it
would fire off an event to set the printer to P987, and Duplex 3. But
I'm obviously missing something. I get no message box...
I found and tried Jonathan West, MVP's solution From:
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116
= Controlling the Printer from Word VBA
Sub PrintDuplexBooklet()
Dim iDuplex As Long
iDuplex = GetDuplex 'save the current setting
Set Duplex 3 'set for vertical binding
ActiveDocument.PrintOut Background:=False
Set Duplex iDuplex 'restore the original setting
End Sub
But I'm not clear on: When the sdOffice application opens the
document, does the Mail Merge, what event can I use to call this
PrintDuplexBooklet procedure?
Be it known, I've already sacrificed a chicken. I hope that helps at
least a bit Does anyone have a suggestion of a really good Word
VBA for Dummies - type book? (I'd like to find substantially more
comprehensive than the Dummies series, but still clear for
beginners!)
Thanks for the help !!!
Cole
I've got a Word 2003 document that I'm trying to create Word VBA code
for, simply to tell it which printer to go to, and to print Duplex 3
(vertical binder.)
I'm still in the early stages of learning the ropes - so I've been
unable to get a macro to fire off when the document gets opened by
another application, (i.e. sdOffice,) and sdOffice tells Word to
perform a Mail Merge with that doc. This is in a Template document
(.dot extension.) I was hoping that when the Mail Merge happens, it
would fire off an event to set the printer to P987, and Duplex 3. But
I'm obviously missing something. I get no message box...
I found and tried Jonathan West, MVP's solution From:
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116
= Controlling the Printer from Word VBA
Sub PrintDuplexBooklet()
Dim iDuplex As Long
iDuplex = GetDuplex 'save the current setting
Set Duplex 3 'set for vertical binding
ActiveDocument.PrintOut Background:=False
Set Duplex iDuplex 'restore the original setting
End Sub
But I'm not clear on: When the sdOffice application opens the
document, does the Mail Merge, what event can I use to call this
PrintDuplexBooklet procedure?
Be it known, I've already sacrificed a chicken. I hope that helps at
least a bit Does anyone have a suggestion of a really good Word
VBA for Dummies - type book? (I'd like to find substantially more
comprehensive than the Dummies series, but still clear for
beginners!)
Thanks for the help !!!
Cole