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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

MessageClass Property of a Post



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 8th 06, 05:59 PM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

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
  #2  
Old June 9th 06, 09:29 AM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

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




  #3  
Old June 9th 06, 01:47 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default MessageClass Property of a Post

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.

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

--
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 ...
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




  #4  
Old June 12th 06, 10:29 AM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

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.

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

--
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
...
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






  #5  
Old June 22nd 06, 05:19 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default MessageClass Property of a Post

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.

--
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.
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






  #6  
Old June 24th 06, 10:23 AM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

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.

--
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.
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








  #7  
Old June 24th 06, 02:24 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default MessageClass Property of a Post

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








  #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
















  #9  
Old June 25th 06, 01:26 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default MessageClass Property of a Post

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.)


That's exactly what you'd see if the item used the regular Post form. That's the way it's designed to work.

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.


When you designed the form, did you click the Edit Read Layout button and create a read layout showing your custom fields?

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

  #10  
Old June 25th 06, 09:58 AM posted to microsoft.public.outlook.program_vba
Geoff
external usenet poster
 
Posts: 21
Default MessageClass Property of a Post

Many thanks for your reply and continued support.

When you designed the form, did you click the Edit Read Layout button and
create a read layout showing your custom fields?


I thought that I had. But to confirm, I have opened my custom form in
design view and I have clicked the "Edit Read Page" and "Edit Compose Page"
buttons. The layout is the same on both pages.

Therefore, I have composed a new custom form with same user-defined fields
and with different layouts for the compose and read pages. This is how a
Post Item behaves when it's created with the new custom form - when there
is, and isn't, a registry string value for the new custom form in:

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

1. Without a registry string value, the Post Item did not display in the
Preview Pane because of its "active content". When the Post Item was
opened, it displayed in the "Read" page layout of the new custom form. When
I then opened the Edit menu and selected Revise Contents, it displayed in
the "Compose" page layout of the custom form.

2. With a registry string value, the Post Item did display in the Preview
Pane. However, when the Post item was opened, it displayed in the regular
Post Item form. And when I then opened the Edit menu and selected Revise
Contents, it continued to be displayed in the regular Post item form.

In summary, I can have no preview with the custom form, or preview with the
regular form. This isn't ideal.

If there is a way round this, that'd be good.

Otherwise, do you think this behaviour is isolated to Outlook 2002? I'm
wondering if, when I distribute the pst file containing the post items
(which is a repository of archive information), I shall need to write a
program to edit the registry on user machines. I'd rather not. I'd prefer
an easier way forward.

That's exactly what you'd see if the item used the regular Post form.
That's the way it's designed to work.


I thought that must be the case.

If you have any further thoughts, they'd be very welcome.

Best regards
Geoff



"Sue Mosher [MVP-Outlook]" wrote in message
...
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.)


That's exactly what you'd see if the item used the regular Post form. That's
the way it's designed to work.

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.


When you designed the form, did you click the Edit Read Layout button and
create a read layout showing your custom fields?

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


 




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
Set MailItem.Sender Property Joshua Ellul Add-ins for Outlook 2 June 8th 06 07:30 PM
A custom icon for my custom MessageClass joan Outlook - Using Forms 0 March 27th 06 10:23 AM
Detect the marked for deletion property [email protected] Outlook and VBA 0 March 16th 06 12:28 AM
Send As Property Outlook VBA [email protected] Outlook and VBA 1 March 15th 06 05:12 PM
How to validate a Custom Property Page Jack Zhang Add-ins for Outlook 1 February 9th 06 08:22 PM


All times are GMT +1. The time now is 08:58 PM.


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.