Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
We have many printers. How do I make a document remember which printer it
should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. -- Regards Tom |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
The required printer is not something stored with the document. You can
intercept the print commands in the documents' templates to address the required printers, and you could do so in the documents themselves, but that would raise macro security issues - see http://www.gmayor.com/fax_from_word.htm for some examples. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ThomasAJ wrote: We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
Hi Graham,
One method that I think Cindy(?) was using was to store the printer name in a custom document property then look for it in a macro. If it doesn't already do so, couldn't the printer toolbar type macro in your examples include looking for that property and if it found in the document property a name that matched a printer (or an array of choices that equalled a printer) then go on to 'suggest'/highlight the 'normally' selected printer (and also variables for trays?) for that document on that toolbar? That would seem to avoid having a macro in a document and also wouldn't affect others who did not run the toolbar macro? ================= "Graham Mayor" wrote in message ... The required printer is not something stored with the document. You can intercept the print commands in the documents' templates to address the required printers, and you could do so in the documents themselves, but that would raise macro security issues - see http://www.gmayor.com/fax_from_word.htm for some examples. -- Graham Mayor - Word MVP -- Bob Buckland ?:-) MS Office System Products MVP *Courtesy is not expensive and can pay big dividends* |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
In article ,
says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. Rubbish! If 'remembered' printer is not present then Word would use the default printer. It might be called a 'Preferred Printer' and reside in OPTIONS. A 5 minute programming exercise is all it would have taken. OK so make that 10 minutes of coding. Very disappointing ommision by MS. I've been coding since about '75 so I know what I am talking about. -- Regards Tom "Peter A" wrote: In article , says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
I would have thought that such an experienced coder would have been able to
arrange something suitable and saved me the bother, but the following macro in the document template (or at a pinch in the document itself - though that raises the spectre of macro security) will do the job. The macro intercepts the print button and looks for the string "COLOR" in the available printers (converting to printer names to upper case) . You can change that string to match the printer you require for the document. Sub FilePrintDefault() Dim StrPrinters As Variant, i As Long Dim sPrinter As String Dim sNone As String StrPrinters = ListPrinters sPrinter = ActivePrinter If IsBounded(StrPrinters) Then For i = LBound(StrPrinters) To UBound(StrPrinters) If InStr(UCase(StrPrinters(i)), "COLOR") Then ActivePrinter = StrPrinters(i) GoTo PrintDoc End If Next i sNone = MsgBox("Required printer not available" & vbCr & vbCr & _ "Print to default Word printer?", vbYesNo, "Printer Error") If sNone vbYes Then MsgBox "Print cancelled" ActivePrinter = sPrinter Exit Sub Else GoTo PrintDoc End If Else MsgBox "No printers found" End If Exit Sub PrintDoc: MsgBox "Printing to " & ActivePrinter ActiveDocument.PrintOut ActivePrinter = sPrinter End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ThomasAJ wrote: You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. Rubbish! If 'remembered' printer is not present then Word would use the default printer. It might be called a 'Preferred Printer' and reside in OPTIONS. A 5 minute programming exercise is all it would have taken. OK so make that 10 minutes of coding. Very disappointing ommision by MS. I've been coding since about '75 so I know what I am talking about. In article , says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
It would of course have helped had I posted that you can get the
Listprinters routine from http://word.mvps.org/FAQs/MacrosVBA/...lePrinters.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Graham Mayor wrote: I would have thought that such an experienced coder would have been able to arrange something suitable and saved me the bother, but the following macro in the document template (or at a pinch in the document itself - though that raises the spectre of macro security) will do the job. The macro intercepts the print button and looks for the string "COLOR" in the available printers (converting to printer names to upper case) . You can change that string to match the printer you require for the document. Sub FilePrintDefault() Dim StrPrinters As Variant, i As Long Dim sPrinter As String Dim sNone As String StrPrinters = ListPrinters sPrinter = ActivePrinter If IsBounded(StrPrinters) Then For i = LBound(StrPrinters) To UBound(StrPrinters) If InStr(UCase(StrPrinters(i)), "COLOR") Then ActivePrinter = StrPrinters(i) GoTo PrintDoc End If Next i sNone = MsgBox("Required printer not available" & vbCr & vbCr & _ "Print to default Word printer?", vbYesNo, "Printer Error") If sNone vbYes Then MsgBox "Print cancelled" ActivePrinter = sPrinter Exit Sub Else GoTo PrintDoc End If Else MsgBox "No printers found" End If Exit Sub PrintDoc: MsgBox "Printing to " & ActivePrinter ActiveDocument.PrintOut ActivePrinter = sPrinter End Sub ThomasAJ wrote: You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. Rubbish! If 'remembered' printer is not present then Word would use the default printer. It might be called a 'Preferred Printer' and reside in OPTIONS. A 5 minute programming exercise is all it would have taken. OK so make that 10 minutes of coding. Very disappointing ommision by MS. I've been coding since about '75 so I know what I am talking about. In article , says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
Thanks for the code Graham.
Also please resist the urge to jump to conclusions regarding the 'experienced coder' aspect. I am very experienced but... not in Word VB. -- Regards Tom "Graham Mayor" wrote: I would have thought that such an experienced coder would have been able to arrange something suitable and saved me the bother, but the following macro in the document template (or at a pinch in the document itself - though that raises the spectre of macro security) will do the job. The macro intercepts the print button and looks for the string "COLOR" in the available printers (converting to printer names to upper case) . You can change that string to match the printer you require for the document. Sub FilePrintDefault() Dim StrPrinters As Variant, i As Long Dim sPrinter As String Dim sNone As String StrPrinters = ListPrinters sPrinter = ActivePrinter If IsBounded(StrPrinters) Then For i = LBound(StrPrinters) To UBound(StrPrinters) If InStr(UCase(StrPrinters(i)), "COLOR") Then ActivePrinter = StrPrinters(i) GoTo PrintDoc End If Next i sNone = MsgBox("Required printer not available" & vbCr & vbCr & _ "Print to default Word printer?", vbYesNo, "Printer Error") If sNone vbYes Then MsgBox "Print cancelled" ActivePrinter = sPrinter Exit Sub Else GoTo PrintDoc End If Else MsgBox "No printers found" End If Exit Sub PrintDoc: MsgBox "Printing to " & ActivePrinter ActiveDocument.PrintOut ActivePrinter = sPrinter End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ThomasAJ wrote: You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. Rubbish! If 'remembered' printer is not present then Word would use the default printer. It might be called a 'Preferred Printer' and reside in OPTIONS. A 5 minute programming exercise is all it would have taken. OK so make that 10 minutes of coding. Very disappointing ommision by MS. I've been coding since about '75 so I know what I am talking about. In article , says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How to make a document 'remember' which printer.
I have just added a page to my site with an add-in that will associate a
document with the required printer and print using that printer if it is available. http://www.gmayor.com/Associate_Printer.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ThomasAJ wrote: Thanks for the code Graham. Also please resist the urge to jump to conclusions regarding the 'experienced coder' aspect. I am very experienced but... not in Word VB. I would have thought that such an experienced coder would have been able to arrange something suitable and saved me the bother, but the following macro in the document template (or at a pinch in the document itself - though that raises the spectre of macro security) will do the job. The macro intercepts the print button and looks for the string "COLOR" in the available printers (converting to printer names to upper case) . You can change that string to match the printer you require for the document. Sub FilePrintDefault() Dim StrPrinters As Variant, i As Long Dim sPrinter As String Dim sNone As String StrPrinters = ListPrinters sPrinter = ActivePrinter If IsBounded(StrPrinters) Then For i = LBound(StrPrinters) To UBound(StrPrinters) If InStr(UCase(StrPrinters(i)), "COLOR") Then ActivePrinter = StrPrinters(i) GoTo PrintDoc End If Next i sNone = MsgBox("Required printer not available" & vbCr & vbCr & _ "Print to default Word printer?", vbYesNo, "Printer Error") If sNone vbYes Then MsgBox "Print cancelled" ActivePrinter = sPrinter Exit Sub Else GoTo PrintDoc End If Else MsgBox "No printers found" End If Exit Sub PrintDoc: MsgBox "Printing to " & ActivePrinter ActiveDocument.PrintOut ActivePrinter = sPrinter End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org ThomasAJ wrote: You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. Rubbish! If 'remembered' printer is not present then Word would use the default printer. It might be called a 'Preferred Printer' and reside in OPTIONS. A 5 minute programming exercise is all it would have taken. OK so make that 10 minutes of coding. Very disappointing ommision by MS. I've been coding since about '75 so I know what I am talking about. In article , says... We have many printers. How do I make a document remember which printer it should use when the print icon is clicked on. Sure I can use the printer drop-down box but I want certain documents to remember their own 'default printer'. You cannot do this. If each document "remembered" a specific printer, it would cause problems when the document went to another person. -- Peter Aitken Author, MS Word for Medical and Technical Writers www.tech-word.com |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I make word remember extra line between paragraph numbers | Microsoft Word Help | |||
Can I get Word 2007 to remember the View for each document? | New Users | |||
How do I make a word document always print to the same printer | Microsoft Word Help | |||
I can't remember the name of a saved document but I do remember s. | Microsoft Word Help | |||
can i use my printer to make out a pesonal check? | New Users |