Delete a custom page

T

Tom

In Outlook 2003 I have a custom message form. On the second page I have the
feilds I created for the user to enter the information, which is inserted
into the body on the standard page. Up to here everything is good. I want
to use before send to delete the custom page (where the enter the info) so
when recieved it just is a standard message.

any suggestions? I have tried both delete and revove without any luck

'Set myPages = Item.GetInspector.ModifiedFormPages
'myPages.Remove("Down User/High Priority")

'Item.GetInspector.Remove "Down User/High Priority"


Thanks
Tom
 
S

Sue Mosher [MVP-Outlook]

Pages can be hidden (Inspector.HideFormPage) but not deleted. The code to show/hide a page needs to be in the form's Item_Open event handler. In this scenario, you might hide the page in the published form's design, then use this code to show the page when the user creates a new message with the form:

Function Item_Open()
If Item.Sent = False Then
Item.GetInspector.ShowFormPage "Down User/High Priority"
End If
End Function
 

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