Is the Form published

  • Thread starter Thread starter Michael Tissington
  • Start date Start date
M

Michael Tissington

If I have an Inspector how can I tell if the form has been published and is
not in design mode?

Thanks.
 
Sue,

Some good ideas...

The first will idea will certainly work but the second fails when opening an
oft

Maybe there is a way to tell if its an oft ?

--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com


Sue Mosher said:
Interesting question. One way to tell that it's not in design mode would
be to check CommandBars for the Form menu (ID = 30145) and examine its
Visible property.
An item using a published form, rather than an one-off or default form,
will have two periods in the MessageClass -- e.g. IPM.Contact.something.
 
Check for the MAPI named property (0x850F, {00062008-0000-0000-C000-000000000046}, PT_BINARY). It would contain the form definition on a one-off form item.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers




Michael Tissington said:
Sue,

Some good ideas...

The first will idea will certainly work but the second fails when opening an
oft

Maybe there is a way to tell if its an oft ?
 
I'm not sure what you mean.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
I mean opening an oft just by clicking on it, does not make it one-off so I
don't see how looking at

"Check for the MAPI named property (0x850F,
{00062008-0000-0000-C000-000000000046}, PT_BINARY). It would contain the
form definition on a one-off form item."

will help telling me if the current inspector/form has been published.


--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com
 
No, that should do it: If that named property is present on the item, it's a one-off. Items created from an .oft file definitely have that property. I haven't tested on items that have been one-offed through other means (poor things).

Maybe you need to give us more of a definition of exactly what you mean by "has been published"? I took that to mean "an item created with a published form."
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
But is this property set only when the item is saved ?

So for a new item I'm still stuck with no idea if the form has been
published.

--
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com


Sue Mosher said:
No, that should do it: If that named property is present on the item, it's
a one-off. Items created from an .oft file definitely have that property. I
haven't tested on items that have been one-offed through other means (poor
things).
Maybe you need to give us more of a definition of exactly what you mean by
"has been published"? I took that to mean "an item created with a published
form."
 
No, it's there on a new item -- I just now peeked at one with Outlook Spy.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top