Outlook 2003 - Button to add body text to an OPEN email

  • Thread starter Thread starter Patrick Pirtle
  • Start date Start date
P

Patrick Pirtle

While editing an email, I'd like to be able to press a button
on a toolbar and have a pre-defined phrase inserted. After
looking for code, it seems like this is not the easiest thing
to do. Although I have found examples of adding body
text AS THE EMAIL IS CREATED, I can't seem to get
it to insert body text to an open-for-editing email.

TIA for any help or suggestions.

____________________________________________
The impossible just takes a little longer...
 
Michael -
Many thanks for your reply. I *have* successfully used
Redemption for moving attachments, so I should (may) be
able to figure this out from here.
____________________________________________
The impossible just takes a little longer...

The opened e-mail is: Application.ActiveInspector.CurrentItem

If you want to add text at the current cursor position then you have
to use Word as e-mail editor or the Redemption (wwww.dimastr.com).
[snip]
 
Michael -
Well, I've gotten it to work, but have a couple of questions.

1. Here's the *working* code:

Sub PleasePlot()
Set SInspector = CreateObject("Redemption.SafeInspector")
SInspector.item = Application.ActiveInspector
SInspector.SelText = "Blah blah blah" & vbCr
End Sub

However, if I use:

SInspector.item = Application.ActiveInspector.CurrentItem

the text doesn't get inserted. Am I missing something in
your original reply?

2. Now, I'd like to grab the Recipient's and CC's names.
I've gone back and looked at dimastr.com, but can't
quite pull it together. Any suggestions?

Once again, thanks for your help.
____________________________________________
The impossible just takes a little longer...


The opened e-mail is: Application.ActiveInspector.CurrentItem

If you want to add text at the current cursor position then you have
to use Word as e-mail editor or the Redemption (wwww.dimastr.com).

[snip]
 
1. Both is correct, the working code works and the other one doesn't. What's
the problem?

2. Now use CurrentItem:

Set sfMail=CreateObject("Redemption.SafeMailItem")
sfMail.Item = Application.ActiveInspector.CurrentItem

Now you can loop though sfMail's Recipients collection.

And never forget to dispose the Safe*Item.Item object:

set sfMail.Item=Nothing
set sfMail=Nothing

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Thu, 13 Sep 2007 09:28:06 -0700 schrieb Patrick Pirtlemka:
Michael -
Well, I've gotten it to work, but have a couple of questions.

1. Here's the *working* code:

Sub PleasePlot()
Set SInspector = CreateObject("Redemption.SafeInspector")
SInspector.item = Application.ActiveInspector
SInspector.SelText = "Blah blah blah" & vbCr
End Sub

However, if I use:

SInspector.item = Application.ActiveInspector.CurrentItem

the text doesn't get inserted. Am I missing something in
your original reply?

2. Now, I'd like to grab the Recipient's and CC's names.
I've gone back and looked at dimastr.com, but can't
quite pull it together. Any suggestions?

Once again, thanks for your help.
____________________________________________
The impossible just takes a little longer...


The opened e-mail is: Application.ActiveInspector.CurrentItem

If you want to add text at the current cursor position then you have
to use Word as e-mail editor or the Redemption (wwww.dimastr.com).

[snip]
 
1. Both is correct, the working code works and the other one doesn't.
What's the problem?

<BG>! This answer speaks directly to my general programming
approach--Just keep writing stuff until something works. Then,
stop. ;^D

Thanks, once again, for your help. Works like a charm.
____________________________________________
The impossible just takes a little longer...


1. Both is correct, the working code works and the other one doesn't.
What's the problem?

2. Now use CurrentItem:
[snip]
 
Back
Top