![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I want to use a word to make a email template for use in a rule as a
autoresponse. Can I pass a string value into the word template when my rule runs the script? I'm parseing out the name from the body of the incoming email and want to pass that string (strFirstName)into a bookmark, in the body of the word template. I also want to include a couple of .jpg files, and hyperlinks in the template, so that it can be read by any reciepient regardless of their email client. I've already tries a word.htm file saved in a .oft template, but when I try to pass the string in, the graphics are attached rather than be visible in the template. When viewed in Outlook express it's all text. code I'm using... Set objItem = Application.CreateItemFromTemplate("C:\Documents and Settings\My Documents\Autorespond.oft") objItem.To = "outlookclient.com" objItem.CC = "outlookexpressclient.net" objItem.Subject = "Thank you for choosing" objItem.Body = "Dear " & strFirstName & "," & vbCrLf & objItem.Body objItem.Send Set objItem = Nothing Set olNS = Nothing Is this possible? I've had trouble finding refrences to this type of application. Thanks in advance! Bob |
#2
|
|||
|
|||
![]()
Umm, okay i'm not 100% sure if this helps, but if you go into outlook
-tools - mail format uncheck use word as the default editor. Then make a new mail message put in everything you want, and save as a template. then reference that template in your code. For some reason i tried to make a template using word and html, but it always threw off the format from the way it originally looked. Heres some code I used to do a custom reply with html body Dim objItem As Object Dim objReply As MailItem Dim strText As String Dim objMail2 As Outlook.MailItem Dim objApp As Outlook.Application Set objItem = GetCurrentItem() Dim substring As String Dim strpath As String 'path of the template strpath = "Z:\My Documents\Button Replies\Set Up Interview.oft" Set objMail2 = CreateItemFromTemplate(strpath) substring = objMail2.HTMLBody Set objReply = objItem.Reply Dim subtext As String subtext = objItem.Subject objReply.BCC = " objReply.Subject = subtext & " BRIDGE FOR JD" 'pops up the window objReply.BodyFormat = olFormatHTML objReply.HTMLBody = substring & objItem.HTMLBody objReply.Display end sub And instead of ojbReply.Display, I think .Send will send it, That's most of my code but i use another funtion so its not going to work, but that will give you an idea. Bob wrote: I want to use a word to make a email template for use in a rule as a autoresponse. Can I pass a string value into the word template when my rule runs the script? I'm parseing out the name from the body of the incoming email and want to pass that string (strFirstName)into a bookmark, in the body of the word template. I also want to include a couple of .jpg files, and hyperlinks in the template, so that it can be read by any reciepient regardless of their email client. I've already tries a word.htm file saved in a .oft template, but when I try to pass the string in, the graphics are attached rather than be visible in the template. When viewed in Outlook express it's all text. code I'm using... Set objItem = Application.CreateItemFromTemplate("C:\Documents and Settings\My Documents\Autorespond.oft") objItem.To = "outlookclient.com" objItem.CC = "outlookexpressclient.net" objItem.Subject = "Thank you for choosing" objItem.Body = "Dear " & strFirstName & "," & vbCrLf & objItem.Body objItem.Send Set objItem = Nothing Set olNS = Nothing Is this possible? I've had trouble finding refrences to this type of application. Thanks in advance! Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions about archiving | Jamie T | Outlook - Installation | 2 | November 22nd 06 12:21 AM |
2 questions | Meg | Outlook - General Queries | 4 | November 21st 06 03:35 PM |
OE 6 questions | gregfarr | Outlook Express | 1 | March 5th 06 12:21 AM |
questions | jpitiot | Outlook Express | 1 | January 30th 06 05:06 AM |
A few questions | Raffi Bearmant | Outlook - General Queries | 1 | January 11th 06 09:59 PM |