View Single Post
  #2  
Old April 15th 09, 02:05 PM posted to microsoft.public.office.developer.outlook.vba,microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Inspector.WordEditor always returns null

Hi Peter,

Outlook version you want to work with?

In Outlook 2007 I've found that until the first Inspector.Activate() event
fires that IsWordMail() and WordEditor are null. That's especially the case
if you try to get those during NewInspector().

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Peter O'Dowd (MVP)" wrote in message
...
I'm writing an Outlook Add-In, using C# in VS 2005. ( not using VSTO) .
The Add-In uses the shim provided my Microsoft for developing add-ins.

Here's a snippet of the code...
Outlook.Inspector oi = MailItem.GetInspector;

Microsoft.Office.Interop.Word.Document doc =
(Microsoft.Office.Interop.Word.Document)oi.WordEdi tor;

I need to position the cursor at a certain location in a part of message
body I populate when the mail item is created, hence why I need access to
the WordEditor

Any help greatly appreciated...
Thanks


--
Peter O'Dowd
Exchange Server MVP
http://www.blade.net.nz




Ads