why can't you add a page to a form just like you can add a page to the property page

D

donald

Hi all

I'm trying to add a page of type "Microsoft.Vbe.Interop.Forms.UserForm"
to a item in outlook. But i don't know the right way to do this in my
VB.net COM add-in.

i have got this code at the mo:

Dim objPages As Outlook.Pages
Dim objPage As Microsoft.Vbe.Interop.Forms.UserForm
objPages = CType(activeClient.GetInspector.ModifiedFormPages,
Outlook.Pages)

Dim a As testing1
a = New testing1
objPage = objPages.Add("testing")


activeClient.GetInspector.ShowFormPage("testing")
activeClient.GetInspector.SetCurrentFormPage("testing")

But i now need to add testing1 on to the form i wish it was a easy as
when u add a property page as the detail expalin below.

So i need to pass the 'a' which is my form in my outlook com add-in

Thanks a lot for any help

Donald


Add method as it applies to the Pages object.

Creates a new page in the Pages collection and returns the new object.
The Pages collection is initially empty, and there is a limit of 5
customizable pages per collection.

expression.Add(Name)
expression Required. An expression that returns a Pages collection
object.

Name Required. String. The name of the page.

Add method as it applies to the PropertyPages object.



Adds a new custom property page to the Microsoft Outlook Options dialog
box or to the folder Properties dialog box.

expression.Add(Page, Title)
expression Required. An expression that returns a PropertyPages
collection object.

Page Required Variant. The property page being added to the dialog
box.

Title Optional String. The caption to be displayed on the
property-page tab.
 
S

Sue Mosher [MVP-Outlook]

Why? Customizing a form programmatically is a very bad idea, unless your ultimate intention is to publish the modified form programmatically.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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