| Code level: intermediate Code area: Outlook Expert Techniques Printer Friendly Version | ||
| Title: Format text with WordMail editor | ||
| Description: Outlook itself provides no mechanism for setting the format of text in a message. However, when WordMail is the editor, you can use Word's objects. This snippet turns the selected text in a mail message red if WordMail is the editor. | ||
| Date: 25-May-2004 04:31 | ||
| Code level: intermediate | ||
| Code area: Outlook Expert Techniques | ||
| Posted by: Sue Mosher | ||
| Body: |
||
| All 11comments |
| Page [ 1 2 Next >> ] | ||
|
|
Sue Mosher
25-May-2004 11:35
Another approach if WordMail is not the editor, if you're working with an item other than a message or post, or if you want to avoid security prompts with Outlook 2002 SP3 is to use the Redemption library , which offers a SafeInspector object ( http://www.dimastr.com/redemption/safeinspector.htm ). For other methods of formatting the body of Outlook items, see http://www.outlookcode.com/d/formatmsg.htm |
|
|
|
Sue Mosher
16-Jun-2004 07:50
For a sample that shows how to use WordMail to insert text and preserve the formatting of an HTML or rich-text item, see http://www.outlookcode.com/codedetail.aspx?id=455 |
|
|
|
markalex
11-Dec-2007 05:17
Sue, Sorry, silly question. I cut'n'paste this macro into outlook 2003 but cannot see it if I select the word as my editor? Doesn't work otherwise? |
|
|
|
Sue Mosher
11-Dec-2007 18:29
This macro is solely for the purpose of demonstrating some basic Word editor techniques. It needs to be run from the main Outlook window because, if Word is your email editor, the macro environment in the individual item window is Word's, not Outlook. |
|
|
|
Jacques
17-Apr-2008 04:41
Hello Sue, I am developping an Outlook add-in for OK2003 and OK2007 which uses similar techniques to modify the content of the Word Document in the Item_Send event. In OK2007 the sent item contains the modifications without needing a call to objDoc.Save. In OK2003, I get a Word Save prompt "Do you want to save the changes" and whatever I answer, teh sent item does not contain the modification as it is sent by the time I can click a button. The workaround is to call objDoc.Save at the end of the code which works fine if teh text format is HTML but raises a COM Exception is the text format is RTF: "command not available". Have you got a solution to this issue? |
|
|
|
Sue Mosher
17-Apr-2008 07:15
Jacques, I'd suggest that you post a new code sample that shows exactly what you're doing, so we can try to duplicate the issue. |
|
|
|
Jacques
18-Apr-2008 06:08
Sue, Thank you for your help. There is too much code to simply post it on this page and I do not have much time to build a working code sample now. Assuming that few people use RTF, I have implemented a text-only workaround which simply uses the item body. It is not perfect but it will do the job for v1. I will send you a link to download the add-in from Codeplex when it is published and we will resume our discussions at this stage if this is acceptable to you. BTW, I like your site. You are doing a great job. Regards, Jacques |
|
|
|
Sue Mosher
18-Apr-2008 07:38
Thanks, I'll look forward to trying it out. |
|
|
|
Jacques
02-May-2008 11:06
Hi Sue, The link to download Memba Velodoc Outlook Add-In on Codeplex is http://www.codeplex.com/velodocaddin. Only the binary can be downloaded at the present time. Source code will be published by the end of May after we have gathered enough feedback and improved the quality. We have learnt a lot from this project and we could certainly share some of our knowledge in a couple of articles which we could contribute to your web site. Please let me know if this is of interest to you. Regards, Jacques http://www.memba.com http://www.velodoc.com |
|
|
|
Jacques
02-May-2008 11:09
I think you have a little bug in your link parser: the dot has been included in the above link which won't work. It should be: http://www.codeplex.com/velodocaddin |
|
| Page [ 1 2 Next >> ] | ||
| Post your comment name email |
