(Msg. 17) Posted: Sun Oct 26, 2008 1:14 pm
Post subject: Re: Setting Send-From Account in VBA [Login to view extended thread Info.] Archived from groups: microsoft>public>outlook>program_vba (more info?)
Unless you explicly remove the old signature and insert teh new onee, I
don't think there is a way to force Outlook to do that for you.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Josh" <jgordon428.TakeThisOut@gmail.com> wrote in message
news:447e7776-0d0f-4e86-86ac-1b8dd6c460ea@u46g2000hsc.googlegroups.com...
On Oct 24, 5:34 pm, "Dmitry Streblechenko" <dmi....TakeThisOut@dimastr.com> wrote:
> Outlook changes the signature when the user sees the message and can
> correct
> any problem.
> AS for sending, it looks like Outlook prevents you from recursively
> calling
> Send: you will need to cancel the ItemSend event, store the message entry
> id
> i n a variable, reopen the message using Namespace.GetItemFromID at a
> later
> point (timer event handler?) and call Send again.
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -"Josh" <jgordon....TakeThisOut@gmail.com> wrote in message
>
> news:2d5c4e66-6cf2-4cac-97ad-2e2b4e57252f@q9g2000hsb.googlegroups.com...
>
> Well, when you change the account manually on a message, it updates
> the signature. So, I assumed there was a way that you could do it
> programatically as well.
>
> Any thoughts on the other question about how to resend the message
> after the account has been manually changed?
>
> Thanks,
> Josh
Sorry if this is double-posting, I don't see my recent reply. I got
the sending portion working using a timer. This is almost complete,
but the signature issue remains. Now the original message gets
canceled, the account gets changed, and then a second later it resends
with the new account. What's the best way to change the signature at
this point? Technically the email is still being displayed on screen
so the user can see the changes. I've seen some suggestions of using
word bookmarks or reading the signature directly from the registry,
but I was wondering if you had a suggestion for the best way to do
that.
(Msg. 18) Posted: Tue Oct 28, 2008 5:49 am
Post subject: Re: Setting Send-From Account in VBA [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Oct 26, 4:14 pm, "Dmitry Streblechenko" <dmi....TakeThisOut@dimastr.com> wrote:
> Unless you explicly remove the old signature and insert teh new onee, I
> don't think there is a way to force Outlook to do that for you.
>
> --
> Dmitry Streblechenko (MVP)http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -"Josh" <jgordon....TakeThisOut@gmail.com> wrote in message
>
> news:447e7776-0d0f-4e86-86ac-1b8dd6c460ea@u46g2000hsc.googlegroups.com...
> On Oct 24, 5:34 pm, "Dmitry Streblechenko" <dmi....TakeThisOut@dimastr.com> wrote:
>
>
>
> > Outlook changes the signature when the user sees the message and can
> > correct
> > any problem.
> > AS for sending, it looks like Outlook prevents you from recursively
> > calling
> > Send: you will need to cancel the ItemSend event, store the message entry
> > id
> > i n a variable, reopen the message using Namespace.GetItemFromID at a
> > later
> > point (timer event handler?) and call Send again.
>
> > --
> > Dmitry Streblechenko (MVP)http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> > -"Josh" <jgordon....TakeThisOut@gmail.com> wrote in message
>
> >news:2d5c4e66-6cf2-4cac-97ad-2e2b4e57252f@q9g2000hsb.googlegroups.com...
>
> > Well, when you change the account manually on a message, it updates
> > the signature. So, I assumed there was a way that you could do it
> > programatically as well.
>
> > Any thoughts on the other question about how to resend the message
> > after the account has been manually changed?
>
> > Thanks,
> > Josh
>
> Sorry if this is double-posting, I don't see my recent reply. I got
> the sending portion working using a timer. This is almost complete,
> but the signature issue remains. Now the original message gets
> canceled, the account gets changed, and then a second later it resends
> with the new account. What's the best way to change the signature at
> this point? Technically the email is still being displayed on screen
> so the user can see the changes. I've seen some suggestions of using
> word bookmarks or reading the signature directly from the registry,
> but I was wondering if you had a suggestion for the best way to do
> that.
>
> Thanks,
> Josh
OK, explicitly removing and inserting is fine. However, I'm not sure
how to get started in terms of:
1) Locating the existing signature in the message and removing it
(given that I will have to determine where the signature block is,
since the text could be anything).
2) Determining which signature goes with the newly selected account
3) Inserting the new signature at the correct location.
(Msg. 19) Posted: Tue Oct 28, 2008 10:40 am
Post subject: Re: Setting Send-From Account in VBA [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Are you sure you really, really want to do that?
Just to give you an example, if you start typing and then select a different
account, chances are you typed in an area that Outlook considers to be the
signature and wipes out your text. Happens to me about 50% of the time.
Luckily, Edit | Undo works fine.
If you do something like that after the user clicked Send and has no chance
to undo the changes or even be aware that something happened, you'll have a
large crowd of very, very unhappy customers.
In other words, don't do that.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Josh" <jgordon428 RemoveThis @gmail.com> wrote in message
news:be860868-3477-4b49-bd96-46054bc038f9@h60g2000hsg.googlegroups.com...
OK, explicitly removing and inserting is fine. However, I'm not sure
how to get started in terms of:
1) Locating the existing signature in the message and removing it
(given that I will have to determine where the signature block is,
since the text could be anything).
2) Determining which signature goes with the newly selected account
3) Inserting the new signature at the correct location.
All times are: Eastern Time (US & Canada) (change) Goto page Previous1, 2, 3
Page 3 of 3
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum