View Single Post
  #5  
Old September 14th 07, 06:01 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook 2003 - Button to add body text to an OPEN email



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...



Michael Bauer [MVP - Outlook] wrote:
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]

Ads