Outlook macro help please

Status
Not open for further replies.
"Victor Delta" <none@nospam.com> wrote in message

news:%23TRmogYqJHA.200@TK2MSFTNGP05.phx.gbl...
> "Victor Delta" <none@nospam.com> wrote in message
> news:OKENscNqJHA.5832@TK2MSFTNGP06.phx.gbl...
> > "PaulD" <nospam> wrote in message
> > news:%23cCpZtJqJHA.1172@TK2MSFTNGP05.phx.gbl...
> >> Victor,
> >> You were correct to change 'Dim WshNetwork As Object', that should work.
> >> Since you could follow my directions before, I would recommened you try
> >> this: set a break point on the line
> >> For i = mySelection.Count To 1 Step -1
> >> in the PrintGreen sub and then run the code. You should be able to
> >> hover
> >> over the strDefault variable to see if it was set, then open your
> >> printers
> >> and faxes window and see if the default printer was switched. To make
> >> sure
> >> I have the same code as you I copied the code from your post below into
> >> a
> >> new module and ran it to make sure it worked. I got an error saying it
> >> couldn't find the printer "GREENPRINT" which is good since I don't have
> >> that
> >> printer. I changed it to a network printer I do have (CutePDF) and it
> >> worked. Investigae some more and post back with your results
> >> Paul D

>

>> Paul
>

>> Thanks. This is most odd. Followed your instructions and sure enough,
> > using
> > the break point, the default printer does change to Green Print and then
> > changes back. However, the print out still seems to go through to the
> > wrong
> > printer, although on a couple of occasions when using Step into (F8) I
> > got
> > it to go to Green Print. I've been trying again and for the last 10
> > minutes
> > it will only go to the wrong printer!
>

>> I'll do some more experimentation but not quite sure why it should be so
> > inconsistent! Any ideas? We're so nearly there...


> Have done some more experimentation and believe I have now found the
> problem - and it's very interesting.

> To aid clarity lets call the two printers Printer A (normal default) and
> Printer Green. Once Outlook is open, if you change the default printer
> (either manually or via your macro with the break point on the "For i =
> ..." line) if you hover over the Print button at the top of any email, you
> will see the name of the new printer (in my case Printer Green). This
> looks very promising...

> However, there's a big gotcha! If you now open the Outlook Print dialogue
> box (Ctrl +P), although you will see the little black tick against the
> name of the new default printer, the original printer (Printer A) is
> actually still selected (highlighted in blue). So if you now print, either
> by clicking the button or running the second part of your code, the email
> goes to the original printer. I guess this is what Ken was telling us all
> along!

> If only there were a way to 'refresh' the printer selection to the new
> default printer it would work but, so far, I haven't thought of one. Any
> ideas?

> The only surprise now is that you've managed to make it work at your end.
> I've been using Windows XP with Outlook XP/2002 and, on another machine,
> Outlook 2003. Same as you?

> V


Just another thought... If it's really not going to be possible to

automatically send emails to Printer Green, then a poor 'second best'

solution would be to only print the first page. From googling on this, I

gather there is no simple way to do this either, unless someone knows

differently...?

V
 
Im running Windows XP with Outlook 2003. My print dialog only shows the

active printer in a pull down list that is disabled so the printer can't be

changed. I do not see my others printers in the dialog or any black tick

marks. As Ken stated earlier, since Outlook doesn't offer any control over

printing, I doubt it would have a refresh option available but I'll see if I

can find anything.

Paul D

Paul D

"Victor Delta" <none@nospam.com> wrote in message

news:%23TRmogYqJHA.200@TK2MSFTNGP05.phx.gbl...

: "Victor Delta" <none@nospam.com> wrote in message

: news:OKENscNqJHA.5832@TK2MSFTNGP06.phx.gbl...

: > "PaulD" <nospam> wrote in message

: > news:%23cCpZtJqJHA.1172@TK2MSFTNGP05.phx.gbl...

: >> Victor,

: >> You were correct to change 'Dim WshNetwork As Object', that should

work.

: >> Since you could follow my directions before, I would recommened you try

: >> this: set a break point on the line

: >> For i = mySelection.Count To 1 Step -1

: >> in the PrintGreen sub and then run the code. You should be able to

hover

: >> over the strDefault variable to see if it was set, then open your

: >> printers

: >> and faxes window and see if the default printer was switched. To make

: >> sure

: >> I have the same code as you I copied the code from your post below into

a

: >> new module and ran it to make sure it worked. I got an error saying it

: >> couldn't find the printer "GREENPRINT" which is good since I don't have

: >> that

: >> printer. I changed it to a network printer I do have (CutePDF) and it

: >> worked. Investigae some more and post back with your results

: >> Paul D

:

: > Paul

:

: > Thanks. This is most odd. Followed your instructions and sure enough,

: > using

: > the break point, the default printer does change to Green Print and then

: > changes back. However, the print out still seems to go through to the

: > wrong

: > printer, although on a couple of occasions when using Step into (F8) I

got

: > it to go to Green Print. I've been trying again and for the last 10

: > minutes

: > it will only go to the wrong printer!

:

: > I'll do some more experimentation but not quite sure why it should be so

: > inconsistent! Any ideas? We're so nearly there...

:

: Have done some more experimentation and believe I have now found the

: problem - and it's very interesting.

:

: To aid clarity lets call the two printers Printer A (normal default) and

: Printer Green. Once Outlook is open, if you change the default printer

: (either manually or via your macro with the break point on the "For i =

> ..."

: line) if you hover over the Print button at the top of any email, you will

: see the name of the new printer (in my case Printer Green). This looks

very

: promising...

:

: However, there's a big gotcha! If you now open the Outlook Print dialogue

: box (Ctrl +P), although you will see the little black tick against the

name

: of the new default printer, the original printer (Printer A) is actually

: still selected (highlighted in blue). So if you now print, either by

: clicking the button or running the second part of your code, the email

goes

: to the original printer. I guess this is what Ken was telling us all

along!

:

: If only there were a way to 'refresh' the printer selection to the new

: default printer it would work but, so far, I haven't thought of one. Any

: ideas?

:

: The only surprise now is that you've managed to make it work at your end.

: I've been using Windows XP with Outlook XP/2002 and, on another machine,

: Outlook 2003. Same as you?

:

: V

:
 
"PaulD" <nospam> wrote in message

news:OoxUBs7qJHA.4364@TK2MSFTNGP04.phx.gbl...
> Im running Windows XP with Outlook 2003. My print dialog only shows the
> active printer in a pull down list that is disabled so the printer can't
> be
> changed. I do not see my others printers in the dialog or any black tick
> marks. As Ken stated earlier, since Outlook doesn't offer any control
> over
> printing, I doubt it would have a refresh option available but I'll see if
> I
> can find anything.
> Paul D


Try opening an HTML email and then pressing Ctrl + P - then you'll see the

print dialogue box I'm talking about (Outlook has different ones for plain

text and HTML emails).

When I click Ctrl + P with the same email selected but closed instead of

open, I get the same dialogue box that you are talking about and curiously

this seems to have the effect of refreshing the printer as if I then open

the email and press Ctrl + P, the new default printer is selected...

I wonder if this gives us a way to solve the refresh problem i.e. close the

email, open print dialogue, cancel, open email, and then print...!? I don't

know if this is possible?

We're so very close to a solution...

Regards,

V
 
For the record I never print emails while they are open... for that matter I

never open them since I keep a preview window open below, so when I select

an email, I can see it in the preview. All of the test printing I did using

the macro was from selected email in the main window, not open emails.

Paul D

"Victor Delta" <none@nospam.com> wrote in message

news:Oko$1U9qJHA.2424@TK2MSFTNGP06.phx.gbl...

: "PaulD" <nospam> wrote in message

: news:OoxUBs7qJHA.4364@TK2MSFTNGP04.phx.gbl...

: > Im running Windows XP with Outlook 2003. My print dialog only shows the

: > active printer in a pull down list that is disabled so the printer can't

: > be

: > changed. I do not see my others printers in the dialog or any black

tick

: > marks. As Ken stated earlier, since Outlook doesn't offer any control

: > over

: > printing, I doubt it would have a refresh option available but I'll see

if

: > I

: > can find anything.

: > Paul D

:

: Try opening an HTML email and then pressing Ctrl + P - then you'll see the

: print dialogue box I'm talking about (Outlook has different ones for plain

: text and HTML emails).

:

: When I click Ctrl + P with the same email selected but closed instead of

: open, I get the same dialogue box that you are talking about and curiously

: this seems to have the effect of refreshing the printer as if I then open

: the email and press Ctrl + P, the new default printer is selected...

:

: I wonder if this gives us a way to solve the refresh problem i.e. close

the

: email, open print dialogue, cancel, open email, and then print...!? I

don't

: know if this is possible?

:

: We're so very close to a solution...

:

: Regards,

:

: V

:
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Help Please!!! Outlook 2016 - VBA Macro for replying with attachment in meeting invite Outlook VBA and Custom Forms 9
C Newbie needs help with Outlook Macro Outlook VBA and Custom Forms 3
A newb outlook macro help Outlook VBA and Custom Forms 1
F Help with Outlook 2007 Macro Please! Using Outlook 4
S Outlook macro help Using Outlook 10
S Outlook 2003: Help with setting up a macro to reply to selected emails Using Outlook 2
L Help for writing an Outlook 2007 macro Outlook VBA and Custom Forms 7
X Custom icon (not from Office 365) for a macro in Outlook Outlook VBA and Custom Forms 1
C Outlook - Macro to block senders domain - Macro Fix Outlook VBA and Custom Forms 1
J Outlook 365 Outlook Macro to Sort emails by column "Received" to view the latest email received Outlook VBA and Custom Forms 0
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
S Outlook Macro for [Date][Subject] Using Outlook 1
E Outlook - Macro - send list of Tasks which are not finished Outlook VBA and Custom Forms 3
S Macro for Loop through outlook unread emails Outlook VBA and Custom Forms 2
Witzker Macro to move @domain.xx of a Spammail to Blacklist in Outlook 2019 Outlook VBA and Custom Forms 7
S Macro for other actions - Outlook 2007 Outlook VBA and Custom Forms 23
S Macro to move “Re:” & “FWD:” email recieved the shared inbox to a subfolder in outlook Outlook VBA and Custom Forms 0
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
M Outlook macro to automate search and forward process Outlook VBA and Custom Forms 6
R Macro Schedule every day in Outlook Using Outlook 0
L Moving emails with similar subject and find the timings between the emails using outlook VBA macro Outlook VBA and Custom Forms 1
N How can I increase/faster outlook VBA Macro Speed ? Using Outlook 2
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
V Outlook Macro to show Flagged messages Outlook VBA and Custom Forms 2
S Macro using .SendUsingAccount only works the first time, after starting Outlook Outlook VBA and Custom Forms 4
M Slow VBA macro in Outlook Outlook VBA and Custom Forms 5
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
C Outlook Subject Line Macro Outlook VBA and Custom Forms 0
D Macro sending outlook template from Excel list Outlook VBA and Custom Forms 6
P Macro to attach a file in a shared Outlook draft folder Outlook VBA and Custom Forms 2
R Macro to check file name with outlook address book Outlook VBA and Custom Forms 0
Diane Poremsky Use a macro to copy data in Outlook email to Excel workbook Using Outlook 0
W macro to export outlook emails to excel Outlook VBA and Custom Forms 6
J Outlook Macro to Update Sharepoint Excel File Using Outlook 1
Patrick van Berkel Best way to share (and keep up-to-date) Macro's in Outlook 2010 Outlook VBA and Custom Forms 6
L Outlook 2007 - Macro Re Search Using Outlook 16
L Outlook 2007 Macro to Contact From a Field Using Outlook 3
Diane Poremsky Macro to Bulk Import Contacts and vCards into Outlook Using Outlook 0
S Outlook 7 VBA macro for multiple filing Outlook VBA and Custom Forms 1
S Macro in an excel for outlook. Outlook VBA and Custom Forms 2
A Outlook Macro Causing Excel Error Outlook VBA and Custom Forms 0
Diane Poremsky Use a macro to copy data in Outlook email to Excel workbook Using Outlook 0
S Outlook Macro Reply to a message Outlook VBA and Custom Forms 1
Diane Poremsky Macro to Bulk Import vCards into Outlook Using Outlook 0
M Outlook VBA Macro that could retrieve/display the (From, Subject, Date Received) Outlook VBA and Custom Forms 2
Philip Rose Recreating a WORD Editing Macro to use in Outlook VBA Outlook VBA and Custom Forms 4

Similar threads

Back
Top