FormsDescription without RDO?

P

Peter Marchert

Hello,

is it possible to read the peronal forms library with RDO?

I searched in the object browser and on the homepage from Dmitry, but I
have no idea where this information could be find.

Thanks,
Peter
 
K

Ken Slovak - [MVP - Outlook]

Do you want FormDescription or the actual Personal Forms Library?

For FormDescription you would use MailItem.FormDescription (or whatever item
type, it could be AppointmentItem, etc.).

The actual form definition for a custom form is stored in the folder where
it's published as a custom hidden message with a MessageClass of
"IPM.Microsoft.FolderDesign.FormsDescription". You would iterate the
HiddenItems collection of the folder looking for that MessageClass. Then you
would look at each returned item there for one with your custom form's
MessageClass in the Field(&H6800001E), which in DASL syntax is
"http://schemas.microsoft.com/mapi/proptag/0x6800001E".

For the actual Personal Forms Library you would get the Root folder (not the
IPMRootFolder) of the default Store object, look for "Common Views" and in
that folder is the Personal Forms Library. That library consists of anything
in that folder with a MessageClass of
"IPM.Microsoft.FolderDesign.FormsDescription".

In Redemption code that would be
oSession.Stores.DefaultStore.RootFolder.Folders.Item("Common
Views").HiddenItems. You would iterate that collection of items. Other
things are stored there also, so you have to check each item in that folder
for the correct MessageClass in Field(&H6800001E).
 
P

Peter Marchert

Thank you, Ken and sorry for replying so late.

@Dmitry:
I needed a list of all contact user forms in Outlook (IPM.Contact.XXX).
To get them I read the Personal Forms Library and the message class of
each contact.

With the answer from Ken I could do it - thanks.

Peter

Do you want FormDescription or the actual Personal Forms Library?

For FormDescription you would use MailItem.FormDescription (or whatever item
type, it could be AppointmentItem, etc.).

The actual form definition for a custom form is stored in the folder where
it's published as a custom hidden message with a MessageClass of
"IPM.Microsoft.FolderDesign.FormsDescription". You would iterate the
HiddenItems collection of the folder looking for that MessageClass. Then you
would look at each returned item there for one with your custom form's
MessageClass in the Field(&H6800001E), which in DASL syntax is
"http://schemas.microsoft.com/mapi/proptag/0x6800001E".

For the actual Personal Forms Library you would get the Root folder (not the
IPMRootFolder) of the default Store object, look for "Common Views" and in
that folder is the Personal Forms Library. That library consists of anything
in that folder with a MessageClass of
"IPM.Microsoft.FolderDesign.FormsDescription".

In Redemption code that would be
oSession.Stores.DefaultStore.RootFolder.Folders.Item("Common
Views").HiddenItems. You would iterate that collection of items. Other
things are stored there also, so you have to check each item in that folder
for the correct MessageClass in Field(&H6800001E).





is it possible to read the peronal forms library with RDO?
I searched in the object browser and on the homepage from Dmitry, but I
have no idea where this information could be find.
Thanks,
Peter

--
Peter Marchert
[EDP-Service Marchert]
Homepage:http://www.marchert.de
Programming for Excel and Outlook- Zitierten Text ausblenden -- Zitierten Text anzeigen -
 
P

Peter Marchert

The actual form definition for a custom form is stored in the folder where
it's published as a custom hidden message with aMessageClassof
"IPM.Microsoft.FolderDesign.FormsDescription". You would iterate the
HiddenItems collection of the folder looking for thatMessageClass. Then you
would look at each returned item there for one with your custom form'sMessageClassin the Field(&H6800001E), which in DASL syntax is
"http://schemas.microsoft.com/mapi/proptag/0x6800001E".

Hello again,

I`m looking for a way to read all published forms of a folder. The
method above I think will only work with CDO, isn`t it? If so, can I
read this informations with RDO too? I didn`t found anything, but it`s
better to ask profis before giving up :)

Thanks for any help!
Peter

PS: CDO for programmers is not very helpful, I think, because I don`t
know if it is installed on the users maschine and I cannot (or it is
not permitted to) install it by my setup. Please correct me, if I`m
wrong.
 
D

Dmitry Streblechenko

Sure, RDOFolder.HiddenItem will get you the folder's hidden messages
collection. This is really not any different from CDO 1.21

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
D

Dan Mitchell

Peter Marchert said:
PS: CDO for programmers is not very helpful, I think, because I don`t
know if it is installed on the users maschine

Though you can find that out at runtime by trying to use one of the
objects and trapping errors
and I cannot (or it is
not permitted to) install it by my setup. Please correct me, if I`m
wrong.

You can't just put the DLL on there yourself, no, but you can drive the
Outlook setup engine to install it:

http://www.microeye.com/resources/itemsCB.htm

has sample code which has that in there.

-- dan
 
P

Peter Marchert

Sure, RDOFolder.HiddenItem will get you the folder's hidden messages
collection. This is really not any different from CDO 1.21

Thanks Dmitry,

here is the CDO-Code I found:

Sub GetMessageClasses()

Dim objSession As New MAPI.Session
Dim objFolders As MAPI.Folders
Dim objFolder As MAPI.Folder
Dim objHiddenMessages As MAPI.Messages
Dim objFDMMessage As MAPI.Message

objSession.Logon

Set objFolders = objSession.GetInfoStore("").RootFolder.Folders

Set objFolder = objFolders.Item("Kontakte")

Set objHiddenMessages = objFolder.HiddenMessages

Set objFDMMessage =
objHiddenMessages.GetFirst("IPM.Microsoft.FolderDesign.FormsDescription")

While Not objFDMMessage Is Nothing

Debug.Print objFDMMessage.Fields(&H6800001E)

Set objFDMMessage = objHiddenMessages.GetNext

Wend

End Sub

Now I tried it with RDO, but it do not work:

Public Sub GetFolderClasses(ByVal objFolder As Object)

Dim objRDOsession As Object
Dim objRDOFolder As Object
Dim objHiddenMessages As Object
Dim objFDMMessage As Object

Set objRDOsession = StartRDOSession()

Set objRDOFolder =
objRDOsession.GetFolderFromID(objFolder.EntryID)

Set objHiddenMessages = objRDOFolder.HiddenItems

For Each objFDMMessage In objHiddenMessages

Debug.Print objFDMMessage.Fields(&H6800001E)

Next

End Sub

Do you have a code example?

Peter
 
P

Peter Marchert

Hello Dan,

thank you for this link. It`s interesting to know that is possible to
install the CDO with the windows installer by code. May be I need this
sometime.

Are there functions, methods or properties in CDO which are not
possible with the redemption.dll?

Peter
 
M

Michael Bauer [MVP - Outlook]

P

Peter Marchert

Hello Michael,

thanks for your reply.

I`m tested it again and it works :)

Before I posted I tried it with a folder which has no folder forms but
forms from the personal forms library. So I assumed the code didn`t
work.

I`m sorry for that and wish all a nice day!

Peter
 
D

Dan Mitchell

Peter Marchert said:
thank you for this link. It`s interesting to know that is possible to
install the CDO with the windows installer by code. May be I need this
sometime.

Are there functions, methods or properties in CDO which are not
possible with the redemption.dll?

Hm. You'd have to ask Dmitry, I don't know for sure; but looking at the
documentation:

"Version 4.0 of Redemption introduced a completely new library: RDO
(Redemption Data Objects) that can function as a complete replacement of
the CDO 1.21 library."

-- dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top