Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Active content in preview pane - solved

837 views
Skip to first unread message

kristan....@googlemail.com

unread,
Sep 12, 2006, 9:44:31 AM9/12/06
to
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

cristina...@gmail.com

unread,
Jun 25, 2019, 10:59:06 AM6/25/19
to
Hi Kristan

I am 0 programmer and I am loosing a lots of time on this issue.

How can I customized your code to work on my IPM.Note.Instruments_Request with less outlook configuration impact ( the company I am working for it is very string on IT stuff) and easy portability since I will need to manually set up to all the team member my custom form.
Thanks

MC
0 new messages