Persisting UserProperties on Responses

M

Mike Morgan

I have a custom form. Unless I use the same Form Class when responding I lose
my UserProperties. So I would like to use the same Form Class to keep those
properties in the form (if there isn't a better way). However if I do that
the "----Original Message----" 'header' information (From, Sent, To, Cc,
Subject) is not brought into the response (assuming that is what the user
wants as his default). Anyone know what the trick is for this?
 
S

Sue Mosher [MVP-Outlook]

You should be able to control how the reply is formatted by adjusting the
settings for the Reply action on the custom form's (Actions) page.
 
M

Mike Morgan

Hi Sue,

Right now I have that set for "Respect user's default". Which should be the
correct behavior I think. The issue is not that it doesn't provide the
message text it doesn't provide the 'Header' above it. Such as:

From: Morgan, Mike
Sent: Thursday, September 04, 2008 6:30 AM
To: Hudson, Keith C.
Subject: FW: PSE 3.0 error when opening
Importance: High


Thanks for the response.

Thanks, Mike
 
S

Sue Mosher [MVP-Outlook]

I can't duplicate that problem here. Do you have any code behind the form
that writes to the Body or HTMLBody property of the reply? If so, you may
need to adjust it so that it adds to the existing content rather than
replacing it.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Mike Morgan

No the only code code in the Form just enables or disables some controls.

One thought did occur to me though: In form design mode the Caption
indicates the form is (HTML). I have noticed the same behaviour in totally
unrelated email(s) on reponding. Would that have an effect? And if so how
would I change it to, say, RTF?
 
S

Sue Mosher [MVP-Outlook]

A reply message uses the same format as the original incoming message. I
don't think changing the format would make any difference, but if you want to
try that, just change the message format to RTF before sending, then see what
happens to the reply.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Mike Morgan

Let me rephrase that.

How would I change the default format for the form while I am in Design
mode? The 'Always use MS Word as Editor option' is disabled.
 
S

Sue Mosher [MVP-Outlook]

A custom form normally has no default format and respects the user's general
default format for messages.

It is possible, however, to force a form always to use RTF. Set RTF as the
general message default, open the form in design mode, and check the 'Always
use MS Word as Editor.' After you publish the form, you can return the
default message format setting to HTML or plain text.

Note that only other Outlook recipients can fully handle RTF messages.
Non-Outlook recipients will have attachment problems.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Mike Morgan

I tested the RTF/HTML and that is not the issue. In looking into another form
I created (which BTW you provided some help with about 5 years ago) I see
that it behaves as one would expect. The primary difference between the two
forms is what I do on the Actions tab and this goes back to my original post.

In the old form, under "Actions : Creates form of type" it uses IPN.Note and
works fine. The new form, under Actions : Creates form of type" it uses
IPN.Note.MyNewFormName. Since this is the only distinguising difference it
leads me to believe that is where the problem may lie, and indeed, if I
change the form to IPN.Note it correctly adds the body of the email. The
issue is that with IPN.Note on responses I seem to lose my UserProperties.
Does that seem like the behavior that should be expected?
 
S

Sue Mosher [MVP-Outlook]

No, that's not the behavior I'd expect. I don't see it on a custom message
form here that I tested to try to duplicate your scenario. Sorry, but I'm out
of ideas on this issue.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Mike Morgan

Hi Sue,

Thanks so much for your effort, sorry I took so long to get back to you.

FWIW: I slowly rebuilt the form step by step. Adding script code along the
way. Every step was fine until the CustomPropertyChange event was added. Then
the offending behavior returned. Go figure. The problem code within this
event was this:

Item.GetInspector.ModifiedFormPages("Message") <...>

The <...> indicates I had several lines of code in this event that were
similar. Note that this same code appears in other events and does not cause
the problem.

Not sure if that is a known issue but I thought I would pass it on.

Thanks again, Mike
 
S

Sue Mosher [MVP-Outlook]

The snippet you posted doesn't tell us much. It shows only that your code
accesses a particular page of the form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
M

Mike Morgan

Sorry, I wasn't trying to point to my code as being the issue. The problem is
that _any_ script within the event causes the issue.

FWIW: the complete statement(s) are:
Item.GetInspector.ModifiedFormPages("Message").[ControlName].Visible =
True|False
 

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