A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Active content in preview pane - solved



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old September 12th 06, 03:44 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 3
Default Active content in preview pane - solved

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.