Re: Rule to reply with email and attach document
- From: John <john.kreps@xxxxxxxxx>
- Date: Tue, 02 Oct 2007 19:26:27 -0000
I think I might be on a (good?) track with some code I found (Sue
Mosher) below. I've created a rule that runs this script. I should be
able to add the attachment here.
Sub RunAScriptRuleRoutine(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim rpl as Outlook.MailItem
strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
Set rpl = msg.Reply
rpl.Body = "some extra text" & vbCrLf & rpl.Body
rpl.Send
Set msg = Nothing
Set olNS = Nothing
End Sub
On Oct 2, 12:16 pm, John <john.kr...@xxxxxxxxx> wrote:
Anyone have any suggestions on the best way to do this: rule applied
to a received email that replies with an email containing an
attachment. The reply is based upon the received email's subject.
I know about creating a rule and using a template. However, I don't
want to save the attachment with the template. I'm constantly updating
the file/attachment and would prefer linking/attaching the file.
For example, an email is received with "today's data" in the subject.
A rule responds by sending an email with the current data file
attached.
I'm familar with Excel/Access VBA---Outlook scripting is a bit
less...friendly. Thanks for any help!
(Sorry, I'd posted this in program_forms be accident)
.
- Follow-Ups:
- Re: Rule to reply with email and attach document
- From: Sue Mosher [MVP-Outlook]
- Re: Rule to reply with email and attach document
- References:
- Rule to reply with email and attach document
- From: John
- Rule to reply with email and attach document
- Prev by Date: Rule to reply with email and attach document
- Next by Date: Re: Change OL message to task, then open it?
- Previous by thread: Rule to reply with email and attach document
- Next by thread: Re: Rule to reply with email and attach document
- Index(es):
Relevant Pages
|