find/replace in outlook message body 
Author Message
 find/replace in outlook message body

Hi.  I am a VBA newbie and I am developing a macro to help
automate the some of the administration for a web site I
control access to.  Basically, the macro will function as
follows:

When the user runs the macro (from excel), new outlook
contacts are created for each selected record, and an
email is sent to each new contact based on a template
(HTML).  There is customized information that needs to be
added to each message, and it seemed the easiest way to do
it would be to do a search and replace within the message
body.  Is this possible?  I have searched the help files,
and asked one of our programmers, but so far noone has
been able to help.  Does anyone have any ideas?  Code
samples would be appreciated.  Response via e-mail would
be appreciated, too.

Thanks in advance for any response.

-charles



Tue, 30 Mar 2004 03:34:07 GMT  
 find/replace in outlook message body
You'd have to develop your own procedures for this using Instr() or
Replace(), etc. A better solution, I think, is to build the different parts
of the message body bit by bit:

    strHTML = some tagged boilerplate & _
                    some custom info from Excel & _
                    more boilerplate
    objItem.HTMLBody = strHTML

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> Hi.  I am a VBA newbie and I am developing a macro to help
> automate the some of the administration for a web site I
> control access to.  Basically, the macro will function as
> follows:

> When the user runs the macro (from excel), new outlook
> contacts are created for each selected record, and an
> email is sent to each new contact based on a template
> (HTML).  There is customized information that needs to be
> added to each message, and it seemed the easiest way to do
> it would be to do a search and replace within the message
> body.  Is this possible?  I have searched the help files,
> and asked one of our programmers, but so far noone has
> been able to help.  Does anyone have any ideas?  Code
> samples would be appreciated.  Response via e-mail would
> be appreciated, too.

> Thanks in advance for any response.

> -charles



Tue, 30 Mar 2004 06:42:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Replacing message body text in Outlook 2000 7 XP

2. Search/Replace in mail message body

3. (*.RTF) as message body to Outlook, Possible???

4. Outlook Automation - SaveAs creates message with empty body

5. Body property of Message in Outlook Object Model

6. Sending HTML In Body of Outlook Message using VBSCRIPT (WSCRIPT)

7. RichTextBox to Outlook Message Body

8. RichTextBox to Outlook Message Body

9. HTML attachment displayed in message body in MS Outlook

10. Creating Excel Spreadsheet from Outlook message body data

11. Retrieving message body text of currently selected message

12. Replace(expression, find, replace[, start[, count[, compare]]])

 

 
Powered by phpBB® Forum Software