Default printer disappears in Word

K

Kangourou77

Hi everyone,

I have deployed some printers in my compagny and, of course, only one by
computer is by default.

Problem :
In word for exemple, I change the printer, and I save it, then I close Word.
I open word again, and... the last printer that I have selected appear (

My question is :
Why please ?? And how to tell to Word, don't memories the last printer that
I have choosen ??

Thank you very much for your help,

Fouad
Sorry for my english
 
S

Suzanne S. Barnhill

By default, whenever you start Word, the Windows default printer will be
selected; only during a Word session does Word remember the last-used
printer, which becomes the currently active one. If Word is remembering the
last-used printer between sessions, then something is wrong; perhaps Word is
still open as your editor in Outlook?

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

Graham Mayor

There is potential when switching printer drivers from Word for the changed
printer to become flagged as the default. The Adobe PDF driver for one
usually displays this property.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

Kangourou77

Thank you Graham Mayor,

Sorry but I think you misunderstood my request :(
I just want to force the windows default printer in word even when someone
change it and save it.

Thank you,
Fouad
 
K

Kangourou77

Hi,

Yes you are perfectly right !! So my question is : How can I do to avoid
this even if outlook is open ? :((

Thank you again
 
G

Graham Mayor

You can't - that's how Word works. It retains the last used printer until
Word is closed and then on next opening it will restart with the default
printer. As I indicated in my first reply to this thread, you need to use a
macro to select an alternative printer, print the document then switch back
to what was set before. The code for that is in the link I pointed you to -
http://www.gmayor.com/fax_from_word.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

On further reflection, you can identify the Default Printer by using vba and
apply it when you create a document or open a document by adding the
following line to both an autoopen and an autonew macro

ActivePrinter = DefaultPrinter

You will then need to create a module to hold the following function that
will identify the default printer and which is called by the above line. If
you add the macros to your normal template the printer will always be
changed to the current default printer when you open or create a document,
regardless of what it may temporarily have been changed to. -
http://www.gmayor.com/word_vba_examples.htm

Public Declare Function GetProfileString Lib "kernel32" _
Alias "GetProfileStringA" _
(ByVal lpAppName As String, _
ByVal lpKeyName As String, _
ByVal lpDefault As String, _
ByVal lpReturnedString As String, _
ByVal nSize As Long) As Long

Public Function DefaultPrinter() As String
Dim strReturn As String
Dim intReturn As Integer
strReturn = Space(255)
intReturn = GetProfileString("Windows", ByVal "device", "", _
strReturn, Len(strReturn))
If intReturn Then
strReturn = UCase(Left(strReturn, InStr(strReturn, ",") - 1))
End If
DefaultPrinter = strReturn
End Function


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top