View Single Post
  #8  
Old June 24th 06, 11:34 PM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

Many thanks for your reply.

As you indicated, the registry key did make the content visible - but not
quite as I had hoped or expected.


This is what I did to the Registry:

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\O utlook\Custom
Forms\Preview

First, the "Custom Forms" and "Preview" keys were not present on my system,
so I added them.

In the Preview key, I added a string value for my custom form
(IPM.POST.Patent Archive Post Form) and set its value data to IPM.POST.


This is what I found in Outlook:

I returned to Outlook and created a new Post Item using the custom form. As
expected, I was able to enter data into the custom fields (Item and Date)
and the three other Outlook fields (Importance, Subject and Bodytext).

After posting the Post Item, only the Subject and Bodytext fields appeared
in the Preview Pane. (It would be nice if the other fields appeared too, but
it's not the end of the world because the custom fields can be still be seen
in the list of Post Items above the Preview Pane.)

What's of more concern is that when I now open the custom Post Item, it
shows in the regular Post Item form. Also, if I then open the Edit menu and
select Revise Contents, it remains in the regular Post Item form. This
means the user does not have access to the custom fields, should they need
to be revised.

Many thanks for getting me this far forward. I feel as though I'm nearly
home-and-dry. If there are any further refinements you know of, I'd be glad
to hear. I'm sorry I don't know enough at this level to take it forward
myself.

Best regards
Geoff



"Sue Mosher [MVP-Outlook]" wrote in message
...
It's the registry value that should make the content visible. Try adding it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Geoff" wrote in message
...
Many thanks for your reply.

I've looked at the knowledgebase article. The article says that Service
Pack 3 for Microsoft Office XP fixes the problem. However, I have Service
Pack 3 for Microsoft Office 2002 installed and I confirm that it has not
fixed the problem on my computer - that is, Post Items created by the user
using the custom form will not display in the Preview Pane (because
Outlook
2002 complains they contain Active Content), whereas Post Items created
using the standard form will display in the Preview Pane. (I assume
Outlook
2002 still uses the term Preview Pane and Outlook 2003 uses the term
Reading
Pane.)

I have not applied the hot-fix or edited the registry, as it seems these
alternatives should be unnecessary given that Service Pack 3 is installed.

It is odd, isn't it? This is a problem acknowledged and fixed by
Microsoft,
but the fix isn't working on my system.

Many thanks for the lead to the KB article. It seems spot on - even
though
I'm still experiencing apparently inappropriate behaviour by Outlook 2002.
.

If you have any further thoughts, I'd be very glad to hear.
Best regards
Geoff.



"Sue Mosher [MVP-Outlook]" wrote in message
...
I create and published a new post form, adding just the 3 extra fields
described below and have no problem seeing the body and header in the
reading pane under Outlook 2003. (My 2002 machine isn't accessible right
now.)

Maybe the fix described at http://support.microsoft.com/?kbid=331788
applies.



"Geoff" wrote in message
...
Many thanks for your reply.
There is no code behind the custom form. The custom form consists of
four
textboxes (and three labels) to display:

1. Custom date field.
2. Custom number field.
3. Outlook's Importance field.
4. Outlook's Body text field (in HTML format).

I have not experimented with removing the custom fields from the custom
form
because that would defeat the purpose of the form. However, I am
wondering
if it's the custom fields that are preventing the Post Items from
displaying
in the Preview Pane. None of the fields (as far as I know) contain
"Active"
content. The VBA code that created the 200 Post Items merely assigned a
date string to the date field, an integer to the number field,
olImportanceHigh or olImportanceNormal to the Importance field, and
filtered
HTML ASCII text (captured from a Word document) to the HTMLBody field.

I now have an odd situation. If the user chooses to add a Post Item
using
the custom form, then the user can enter data into the two custom fields
but
the resulting Post Item will not display in the Preview Pane. On the
other
hand, the 200 Post Items (created by VBA code behind a Word document)
will
display in the Preview Pane (because the MessageClass property wasn't
set),
but, when the Post Items are opened, the values of the custom fields are
not
displayed (obviously).

My priority is to show the Post Items in the Preview Pane. Therefore,
I'm
guessing I'll have to abandon the custom form and use a macro assigned to
a
toolbar button to capture the custom field values for new Post Items.
This
doesn't feel like a neat solution. I assume I'm up against a limitation
of
Outlook's product design.

Many thanks for the tip about using AutoPreview. This isn't quite what's
needed for this application (as it only displays 3 lines of body text).

Incidentally, I'm using Outlook 2002.

Again, many thanks for your interest and reply.
If there's anything else I could try, I'd be very glad to hear.
Best regards
Geoff.



"Sue Mosher [MVP-Outlook]" wrote in message
...
The "active content" refers to the form, not the HTML content. If there
is
code behind the custom form, items created with that form won't be
visible
in the reading pane. The Body text will, however, be visible in
AutoPreview.

"Geoff" wrote in message
...
Postscript from Geoff:

In case it makes any difference:

To copy the formatting in the Word document to the Post Items, used
these
steps:

1. I copied each Word cell to a blank document using the
FormattedText
property of Word's range object, eg:

objRNG_TARGET.FormattedText = objRNG_SOURCE_CELL.FormattedText

2. I then used the "wdFormatFilteredHTML" constant with the SaveAs
method
on the target document to save the document in HTML format, without, I
hoped, any active content.

3. I read the resultant text (.htm) file using VBA's Open method to
capture the ASCII text.

4. I set the HTMLBody property of the Post Item to the text I'd
captured.

I would have thought this method would ensure that the Post Items did
not
contain any Active content.
But Outlook complains that they do!

Any help would be appreciated.
TIA
Geoff




"Geoff" wrote in message
...
Using VBA, I extracted text from 200 rows of a Word table and created
200
Post Items. I wanted the Posts Items displayed in an Outlook form I'd
designed, so VBA set the MessageClass property of each Post Item to:

objMYPOST.MessageClass = "IPM.Post.My Form"

The result was that the posts could not be viewed in the Preview Pane
because Outlook said they contained Active content.

Is there any way to set a custom form for a post and get it displayed
in
the Preview Pane?

TIA
Geoff
















Ads