Hi Ken,
I found what was wrong, I had to type cast it to Outlook.Pages then
when I have the pages object call the page I want and type cast that to
OLForms.UserForms, eg: UserForm = (OLForms.UserForms) pages["Item"]; I have
another question that you might be able to help with. I am trying to add the
tab to the appointment item, now I can add the tab (page) but it is not been
made visible, I can only see it in design mode on the form. Do you know how
to make it visible ? Thanks for the help.
"lg" wrote:
I got the OLFroms working now thanks, but I am still having a problem with
getting a handle to the pages in the inspector. With the line of code:
colPages = oInsp.ModifiedFormPages;
I had to type cast "oInsp.ModifiedFormPages" because the ModifiedFormPages
property returns an object. When I type cast it to "Outlook.Pages" it works
alright but if I type cast it "OLForms.Pages" it dosnt work. Do you have any
sugguestions around this ?
"Ken Slovak - [MVP - Outlook]" wrote:
My bad. I left out some alias declarations in the "using" section before the
start of class ThisApplication:
using Outlook = Microsoft.Office.Interop.Outlook;
using OLForms = Microsoft.Vbe.Interop.Forms;
using Office = Microsoft.Office.Core;
etc.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"lg" wrote in message
...
This might seem like a bit of a dumb question, I added the reference "MS
Forms 2.0" to the project but the Visual Studio dos'nt seem to recognize
OLForms as a valid namespace, am I missing some else ?