Re-Opening a Saved Message

O

Outlook Worm

Hi All,

I have designed a custom form based on Message template. I create a
message in it and then Save it, by pressing a button on the form, to a
folder say Outbox. When i reopen it from the Folder [double clicking
it], it will open the saved Message. If the User makes some changes to
the message contents, and presses the Save button again, it creates a
separate copy of the message. How can i identify that current item is
infact opened from the folder, not the New form.

I have another question. If i have saved a custom form based item to
some folder. Now in Addin Code, i get All Items in that folder. Can i
get contents of the custom controls i inserted on the form in addition
to standard controls like Subject, Body etc. My custom controls include
Text Boxes and Combo Boxes.

Please guide.

Khan G
 
S

Sue Mosher [MVP-Outlook]

Comments below.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Outlook Worm said:
I have designed a custom form based on Message template. I create a
message in it and then Save it, by pressing a button on the form, to a
folder say Outbox. When i reopen it from the Folder [double clicking
it], it will open the saved Message. If the User makes some changes to
the message contents, and presses the Save button again, it creates a
separate copy of the message. How can i identify that current item is
infact opened from the folder, not the New form.

When the first save operation occurs, set a flag property on the item to
indicate that the item has already gone through the process. Check the value
of that property on subsequent saves and have your code proceed accordingly.
I have another question. If i have saved a custom form based item to
some folder. Now in Addin Code, i get All Items in that folder. Can i
get contents of the custom controls i inserted on the form in addition
to standard controls like Subject, Body etc. My custom controls include
Text Boxes and Combo Boxes.

Yes, you can do this, using the same code as behind a form, but why? The
"contents" of the controls are the property values stored in the item, which
you can access directly. See http://www.outlookcode.com/d/propsyntax.htm
 

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