Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Active content in preview pane - solved
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kristan.mcdonald@googlema il.com  
View profile  
(1 user)  More options Sep 12 2006, 9:44 am
Newsgroups: microsoft.public.outlook.program_forms
Followup-To: microsoft.public.outlook.program_forms
From: "kristan.mcdon...@googlemail.com" <kristan.mcdon...@googlemail.com>
Date: 12 Sep 2006 06:44:31 -0700
Local: Tues, Sep 12 2006 9:44 am
Subject: 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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google