![]() |
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
|
|||
|
|||
![]()
Ok, finally managed to get this working, you can have as much code etc.
in your custom form as you want, but STILL have it display properly in the preview pane. Basically there's a CDO property (0x8002) which controls whether outlook should render the preview pane or not. When sending the message with the custom code, if you set this to zero, when received your mail will render in the preview pane correctly. It was a bit tricky to get working, in the end I had to write an addin to watch for send events with the message class matching my own and then do the following (in the current mail send event): If objCurMail.MessageClass = "IPM.Note.MyMessageClass" Then On Error Resume Next Dim objCDOMail As MAPI.Message objCurMail.Save 'Need to save to get an entryID Dim strEntryID Dim strStoreID strEntryID = objCurMail.EntryID strStoreID = objCurMail.Parent.StoreID 'Get the mail via CDO Set objCDOMail = gobjCDO.Session.GetMessage(strEntryID, strStoreID) If Not objCDOMail Is Nothing Then 'We've got our mail, set the property objCDOMail.Fields.Add -2147352573, 0, 0, "2903020000000000C000000000000046" 'Update the mail objCDOMail.Update True End If 'Send it via CDO objCDOMail.Send 'Use our addin to close the mail and the inspector objCurMail.Close (olSave) objCurInsp.Close (olSave) Set objCDOMail = Nothing Set objCurMail = Nothing End If Now I'm no Outlook programming guru, so this can probably be tidied up lots and tested further, but now when I send an email, it arrives and the preview pane works - and I need to get the rest of the development finished now! Feel free to email if you have any comments/suggestions, I hope this is helpful to someone! Kristan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Emails missing complete body content, but msg is partly visible in preview mode | [email protected] | Outlook - General Queries | 0 | August 30th 06 12:12 PM |
select navigation pane content | Nkv | Add-ins for Outlook | 10 | August 9th 06 03:07 PM |
OL2003: This item contains active content blah | [email protected] | Outlook - Using Forms | 5 | June 16th 06 08:41 PM |
Active X content and Security Controls | Mary Ann B. | Outlook Express | 6 | April 25th 06 07:41 PM |
Restricted from showing active content. How to overide for loca files? | Guillermo Scharffenorth | Outlook Express | 1 | February 1st 06 10:23 PM |