Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
BK BK is offline
external usenet poster
 
Posts: 144
Default Save Printer with document

Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the specific
selected printer with a Word document so that when I open that document, it
will already have the correct printer selected?


  #2   Report Post  
Posted to microsoft.public.word.newusers
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Save Printer with document

Unfortunately, no, it is not possible to save printer selection with a
document.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the specific
selected printer with a Word document so that when I open that document,
it will already have the correct printer selected?



  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Save Printer with document

While strictly that is accurate, it can be worked around by saving the
printer information in a document variable or custom property and
interrogating the document variables/properties at print time to see if a
printer has been recorded and selecting that printer for the job. Actually I
thought I had included the macros to provide this function on my
http://www.gmayor.com/fax_from_word.htm page, but apparently I haven't.
Seems like a task for the weekend

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Suzanne S. Barnhill wrote:
Unfortunately, no, it is not possible to save printer selection with a
document.


"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the
specific selected printer with a Word document so that when I open
that document, it will already have the correct printer selected?



  #4   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Save Printer with document

Just in case I don't get around to my web page, the code required (store in
the normal template or the relevant document template) would be as follows.
The first macro will record the named printer in the current document. Run
the macro and save the document. The other two macros intercept the
fileprint and fileprintdefault commands that print the document to establish
whether the variable is present in the current document and if it is print
to that document. It makes no allowance for a named printer not being
available, though extra error trapping could be included.

Sub SetHPAsDocumentPrinter()
Dim oVars As Variables
Set oVars = ActiveDocument.Variables
oVars("varPrinter").Value = "HP LaserJet 4050 Series PCL"
End Sub

Sub FilePrintDefault()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
End If
End Sub

Sub FilePrint()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
Dialogs(wdDialogFilePrint).Show
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then Dialogs(wdDialogFilePrint).Show
End Sub

http://www.gmayor.com/installing_macro.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Graham Mayor wrote:
While strictly that is accurate, it can be worked around by saving the
printer information in a document variable or custom property and
interrogating the document variables/properties at print time to see
if a printer has been recorded and selecting that printer for the
job. Actually I thought I had included the macros to provide this
function on my http://www.gmayor.com/fax_from_word.htm page, but
apparently I haven't. Seems like a task for the weekend


Suzanne S. Barnhill wrote:
Unfortunately, no, it is not possible to save printer selection with
a document.


"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the
specific selected printer with a Word document so that when I open
that document, it will already have the correct printer selected?



  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Save Printer with document

I thought when I posted earlier that I had included this on my web site. I
looked for it on the wrong page (

The correct link would be 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






Graham Mayor wrote:
Just in case I don't get around to my web page, the code required
(store in the normal template or the relevant document template)
would be as follows. The first macro will record the named printer in
the current document. Run the macro and save the document. The other
two macros intercept the fileprint and fileprintdefault commands that
print the document to establish whether the variable is present in
the current document and if it is print to that document. It makes no
allowance for a named printer not being available, though extra error
trapping could be included.
Sub SetHPAsDocumentPrinter()
Dim oVars As Variables
Set oVars = ActiveDocument.Variables
oVars("varPrinter").Value = "HP LaserJet 4050 Series PCL"
End Sub

Sub FilePrintDefault()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
End If
End Sub

Sub FilePrint()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
Dialogs(wdDialogFilePrint).Show
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then Dialogs(wdDialogFilePrint).Show
End Sub

http://www.gmayor.com/installing_macro.htm



Graham Mayor wrote:
While strictly that is accurate, it can be worked around by saving
the printer information in a document variable or custom property and
interrogating the document variables/properties at print time to see
if a printer has been recorded and selecting that printer for the
job. Actually I thought I had included the macros to provide this
function on my http://www.gmayor.com/fax_from_word.htm page, but
apparently I haven't. Seems like a task for the weekend


Suzanne S. Barnhill wrote:
Unfortunately, no, it is not possible to save printer selection with
a document.


"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the
specific selected printer with a Word document so that when I open
that document, it will already have the correct printer selected?





  #6   Report Post  
Posted to microsoft.public.word.newusers
BK BK is offline
external usenet poster
 
Posts: 144
Default Save Printer with document

Thanks for all this information. Seems like it would be a lot easier to
just change the printer preference when I open the document! grin


"Graham Mayor" wrote in message
...
I thought when I posted earlier that I had included this on my web site. I
looked for it on the wrong page (

The correct link would be 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






Graham Mayor wrote:
Just in case I don't get around to my web page, the code required
(store in the normal template or the relevant document template)
would be as follows. The first macro will record the named printer in
the current document. Run the macro and save the document. The other
two macros intercept the fileprint and fileprintdefault commands that
print the document to establish whether the variable is present in
the current document and if it is print to that document. It makes no
allowance for a named printer not being available, though extra error
trapping could be included.
Sub SetHPAsDocumentPrinter()
Dim oVars As Variables
Set oVars = ActiveDocument.Variables
oVars("varPrinter").Value = "HP LaserJet 4050 Series PCL"
End Sub

Sub FilePrintDefault()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
End If
End Sub

Sub FilePrint()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
Dialogs(wdDialogFilePrint).Show
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then Dialogs(wdDialogFilePrint).Show
End Sub

http://www.gmayor.com/installing_macro.htm



Graham Mayor wrote:
While strictly that is accurate, it can be worked around by saving
the printer information in a document variable or custom property and
interrogating the document variables/properties at print time to see
if a printer has been recorded and selecting that printer for the
job. Actually I thought I had included the macros to provide this
function on my http://www.gmayor.com/fax_from_word.htm page, but
apparently I haven't. Seems like a task for the weekend


Suzanne S. Barnhill wrote:
Unfortunately, no, it is not possible to save printer selection with
a document.


"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the
specific selected printer with a Word document so that when I open
that document, it will already have the correct printer selected?





  #7   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Save Printer with document

Not when all the work has been done for you, but that is indeed a
possibility - if you can remember to do so and you can remember which
printer it was configured for eg see also printing to a suitable available
printer e.g a colour printer at 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



BK wrote:
Thanks for all this information. Seems like it would be a lot
easier to just change the printer preference when I open the
document! grin

"Graham Mayor" wrote in message
...
I thought when I posted earlier that I had included this on my web
site. I looked for it on the wrong page (

The correct link would be 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






Graham Mayor wrote:
Just in case I don't get around to my web page, the code required
(store in the normal template or the relevant document template)
would be as follows. The first macro will record the named printer
in the current document. Run the macro and save the document. The
other two macros intercept the fileprint and fileprintdefault
commands that print the document to establish whether the variable
is present in the current document and if it is print to that
document. It makes no allowance for a named printer not being
available, though extra error trapping could be included.
Sub SetHPAsDocumentPrinter()
Dim oVars As Variables
Set oVars = ActiveDocument.Variables
oVars("varPrinter").Value = "HP LaserJet 4050 Series PCL"
End Sub

Sub FilePrintDefault()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then
'MsgBox "Printing to " & ActivePrinter
ActiveDocument.PrintOut
End If
End Sub

Sub FilePrint()
Dim oVars As Variables
Dim vVar As Variant
Dim bExists As Boolean
Dim sPrinter As String
sPrinter = ActivePrinter
Set oVars = ActiveDocument.Variables
bExists = False
For Each vVar In oVars
If vVar.name = "varPrinter" Then
bExists = True
With Dialogs(wdDialogFilePrintSetup)
sPrinter = .Printer
.Printer = oVars("VarPrinter").Value
.DoNotSetAsSysDefault = True
.Execute
Dialogs(wdDialogFilePrint).Show
.Printer = sPrinter
.DoNotSetAsSysDefault = True
.Execute
End With
Exit For
End If
Next vVar
If bExists = False Then Dialogs(wdDialogFilePrint).Show
End Sub

http://www.gmayor.com/installing_macro.htm



Graham Mayor wrote:
While strictly that is accurate, it can be worked around by saving
the printer information in a document variable or custom property
and interrogating the document variables/properties at print time
to see if a printer has been recorded and selecting that printer
for the job. Actually I thought I had included the macros to
provide this function on my
http://www.gmayor.com/fax_from_word.htm page, but apparently I
haven't. Seems like a task for the weekend Suzanne S. Barnhill
wrote:
Unfortunately, no, it is not possible to save printer selection
with a document.


"BK" wrote in message
...
Using Windows XP and Office 2007

We have a number of network printers. Is it possible to save the
specific selected printer with a Word document so that when I
open that document, it will already have the correct printer
selected?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I save my choice of printer as part of a document? moodyjane Microsoft Word Help 2 May 30th 09 03:17 AM
How do I save printer settings to a certain document? Admin Asst. Microsoft Word Help 9 November 5th 08 03:41 PM
Save/Save As Menu Options Don't Save Document erik_gregory Microsoft Word Help 1 July 16th 08 05:12 PM
Clicking on the Printer icon, up pops a "Save As" Screen. Don J[_2_] New Users 3 July 7th 07 02:43 PM
How do I save printer settings per document? TLC@Newark Microsoft Word Help 2 June 13th 07 02:52 PM


All times are GMT +1. The time now is 02:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"