how to create alternative compose layout

W

Wayne

My problem: A user opens a form published in our organizational library.
The user fills the form out and sends it to their supervisor. The supervisor
forwards the email but the original Compose layout is opened. The supervisor
needs to have additional fields in their Compose layout for
"approval/disapproval" options. The supervisor then sends it onto HR and
the email is printed.

How do I go about creating an alternative compose layout for the supervisor?
I would also like to have the alternative compose layout showing all details
of the original compose layout as read only.

Thanks
 
S

Sue Mosher [MVP-Outlook]

A message form has only one compose layout. (It can also have a read
layout.) If you want the compose layout to look different in some
situations, you can add all the necessary controls to the compose layout and
use code in the Item_Open event handler to show, hide, and otherwise modify
controls depending on the state or user.
 
W

Wayne

Yes, I understand all of this thanks.

Im just not sure how to go about it. When the form is opened it should
always be as is, but when it is sent, received by the next person and they
forward it, it should contain some new fields.

So Im guessing the way to do this might be by using the Size Property? So
if the Size=0 then it's being composed for the first time, but if Size=1 it's
the second time it is being composed (i.e. forwarded) - correct? Im trying
to find code examples and researching but to no avail. I have no idea how I
would make other fields become visible IF size=1.

I also just wanted to know if it's possible to disable the "Reply" and
"Reply To All" buttons - I only want the form to be forwarded.

Thanks so much for your help
Wayne
 
S

Sue Mosher [MVP-Outlook]

Easy things first: Disable Reply and Reply to All in the (Actions) tab.

Instead of Item_Open, it might be easier to use Item_Forward, which passes
as an argument the new forward item. You can then work with its pages and
controls to make them visible, disable them,etc. , as described at
http://www.outlookcode.com/d/propsyntax.htm#unbound.

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

Wayne

I have set the code as follows:

If Item.Size = 0 Then
Item.UserProperties("Approved").Visible = False
End If

But it doesn't work. Not sure if my syntax is correct or not.
 
W

Wayne

I have figured out who to disable Reply and Reply To All buttons.

If anyone comes across this wanting to know, it's in Design mode under the
Actions tab.
 
W

Wayne

Sorted it out.

For anyone looking for the solution:

If Item.Size = 0 Then
Item.GetInspector.ModifiedFormPages("Message").Controls("Approved").Visible = False
End If
 

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