VBA change outgoing email to plain text

R

Ron Dahl

I have written a program in VBA for Excel that sends several hundred items
to our fax server (via Outlook) at a time.

The users are supposed to remember to change Outlook from HTML to plain text
before they send the faxes, and then they are welcome to change Outlook back
to HTML.
If they forget, it clogs up the fax server, because the fax server doesn't
deal well with HTML.

Can anyone give me some hints on the VBA code that would:

1. Detect if Outlook is set to either HTML, Rich Text or Plain Text
2. Switch it to Plain Text until all the faxes are sent.
3. Switch it back to its original setting (either HTML, Rich Text or Plain
Text) after the faxes are sent.

Thanks in advance for any help.
 
S

Sharad Naik

You can add below code in Item.Send event procedure.

'your code to indentify if is is fax, and if it is then below code.

Dim myStr As String
myStr = ActiveInspector.CurrentItem.Body
ActiveInspector.CurrentItem.BodyFormat = 1
ActiveInspector.CurrentItem.Body = myStr
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top