Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Print macro using Microsoft Office Document Image Writer
I am using Word 2003 on Windows XP Pro.
I need to set up a print macro that prints a template to Microsoft Office Document Image Writer. I got the macro set up to engage the printer but not sure how to proceed on the following steps: 1. I need Microsoft Office Document Image Writer to open 2. then you have to select one of 6 file names 3. save as one of those names then it is saved as a .tiff image 4. then need the printer to reset back to default printer for regular printing. I have step one down but unsure how to proceed on the next three steps. Any suggestion on the next steps or where I could find documentation to assist me would be appreciated. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Print macro using Microsoft Office Document Image Writer
The document image writer is covered at
http://www.gmayor.com/pdf_to_word.htm Essentially the following will print to the image writer then reset the printer Sub PrintMODI() Dim sPrinter As String sPrinter = ActivePrinter ActivePrinter = "Microsoft Office Document Image Writer" Application.PrintOut ActivePrinter = sPrinter End Sub Insert the filename at the prompt or accept the default -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org tobnull wrote: I am using Word 2003 on Windows XP Pro. I need to set up a print macro that prints a template to Microsoft Office Document Image Writer. I got the macro set up to engage the printer but not sure how to proceed on the following steps: 1. I need Microsoft Office Document Image Writer to open 2. then you have to select one of 6 file names 3. save as one of those names then it is saved as a .tiff image 4. then need the printer to reset back to default printer for regular printing. I have step one down but unsure how to proceed on the next three steps. Any suggestion on the next steps or where I could find documentation to assist me would be appreciated. |
#3
|
|||
|
|||
Well this works in getting the document image writer to do what I want, however it does not reset to default printer but instead changes default printer to document image writer.
I tried various ways of rewriting the macro but am not having any success. Should have added this info, my computer is on a network with an assigned printer out of a list on the floor which I work. Tried adding the printer name to the macro but does not seem to work. Took out the final step, added an extra step but none of my current ideas work, most want me to debug the macro or do nothing. Suggestions on this final stage of the macro should go to return to the assigned printer? Quote:
|
#4
|
|||
|
|||
Well after tinkering around I think I found away to make it work:
Sub MAIN() 'Retrieve and set information about the current default printer Dim FPS As FilePrintSetup GetCurValues FPS 'Set the default Printer DefaultPrinter$ = FPS.Printer Sub PrintMODI() Dim sPrinter As String sPrinter = ActivePrinter ActivePrinter = "Microsoft Office Document Image Writer" Application.PrintOut ActivePrinter = sPrinter 'Reset to the original default printer End Sub seems to work everytime. Quote:
|
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Print macro using Microsoft Office Document Image Writer
The macro as written should return the printer setting as it was when the
macro was run. If you want a more belt and braces approach Sub PrintMODI() Dim sCurrentPrinter As String On Cancel GoTo Cancelled: sCurrentPrinter = ActivePrinter ActivePrinter = "Microsoft Office Document Image Writer" Application.PrintOut FileName:="" Cancelled: With Dialogs(wdDialogFilePrintSetup) .Printer = sCurrentPrinter .DoNotSetAsSysDefault = False .Execute End With End Sub See http://www.gmayor.com/fax_from_word.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org tobnull wrote: Well this works in getting the document image writer to do what I want, however it does not reset to default printer but instead changes default printer to document image writer. I tried various ways of rewriting the macro but am not having any success. Should have added this info, my computer is on a network with an assigned printer out of a list on the floor which I work. Tried adding the printer name to the macro but does not seem to work. Took out the final step, added an extra step but none of my current ideas work, most want me to debug the macro or do nothing. Suggestions on this final stage of the macro should go to return to the assigned printer? Essentially the following will print to the image writer then reset the printer Sub PrintMODI() Dim sPrinter As String sPrinter = ActivePrinter ActivePrinter = "Microsoft Office Document Image Writer" Application.PrintOut ActivePrinter = sPrinter End Sub Insert the filename at the prompt or accept the default -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org tobnull wrote:- I am using Word 2003 on Windows XP Pro. I need to set up a print macro that prints a template to Microsoft Office Document Image Writer. I got the macro set up to engage the printer but not sure how to proceed on the following steps: 1. I need Microsoft Office Document Image Writer to open 2. then you have to select one of 6 file names 3. save as one of those names then it is saved as a .tiff image 4. then need the printer to reset back to default printer for regular printing. I have step one down but unsure how to proceed on the next three steps. Any suggestion on the next steps or where I could find documentation to assist me would be appreciated. - |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Print macro using Microsoft Office Document Image Writer
That worked much better thanks, not sure why the first did not work.
|
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Microsoft Office Document Image Writer | Microsoft Word Help | |||
open an Microsoft Office Document Image Writer file | Microsoft Word Help | |||
microsoft office document image writer | Microsoft Word Help | |||
Microsoft Office Document Image Writer removed again | Microsoft Word Help | |||
Microsoft Office Document Image Writer removed again | Microsoft Word Help |