A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Property pages in OL 2007 addin



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 12th 07, 10:51 PM posted to microsoft.public.outlook.program_forms
Scott
external usenet poster
 
Posts: 118
Default Property pages in OL 2007 addin

Sorry that this isn't quite the right newsgroup, but it's the best place I
could find to post.

When developing an add-in using VSTO 2005 SE to make an Outlook 2007 add-in,
is there a new model for property pages? I've implemented the
Outlook.PropertyPage stuff on a UserControl, and have the [DispId(-518)]
attribute set on my PageCaption property getter, but when I go into
Tools-Options I don't see my property page.
Ads
  #2  
Old January 15th 07, 04:50 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Property pages in OL 2007 addin

It's the same old object model for property pages. This looks like it's a C#
addin?

In my user control for the property pages I have this:

[DispID(-518)]
public string Caption
{
// m_caption has the caption
get { return m_caption; }
set { m_caption = value; }
}

In my property page event handler in ThisAddin I have this (example for
Tools, Options property page):

private void m_objOutlook_OptionsPagesAdd(Outlook.PropertyPages Pages)
{
ToolsOptionsPP oPP = new ToolsOptionsPP(); //the user control
string caption = "Whatever caption you want";

oPP.Caption = caption;
Pages.Add(oPP, caption);

oPP = null;
}

That's it. Nothing fancy.

One other thing, did you set the
[System.Runtime.InteropServices.ComVisibleAttribute (true)] attribute for the
user control class? It would look like this:

[System.Runtime.InteropServices.ComVisibleAttribute (true)]
public partial class ToolsOptionsPP : UserControl
{

I'd probably use the program_addins or program_vba groups as more
appropriate, BTW. Program_vba has become a catch-all and isn't only VBA
stuff any longer.

--
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


"Scott" wrote in message
...
Sorry that this isn't quite the right newsgroup, but it's the best place I
could find to post.

When developing an add-in using VSTO 2005 SE to make an Outlook 2007
add-in,
is there a new model for property pages? I've implemented the
Outlook.PropertyPage stuff on a UserControl, and have the [DispId(-518)]
attribute set on my PageCaption property getter, but when I go into
Tools-Options I don't see my property page.


  #3  
Old January 15th 07, 06:21 PM posted to microsoft.public.outlook.program_forms
Scott
external usenet poster
 
Posts: 118
Default Property pages in OL 2007 addin

"Ken Slovak - [MVP - Outlook]" wrote:

One other thing, did you set the
[System.Runtime.InteropServices.ComVisibleAttribute (true)] attribute for the
user control class? It would look like this:


Do I have to admit that I forgot to do that? lol. thanks!

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with an Addin using IExchExtCommands and Outlook 2007 B2 T Christophe SAINCLIVIER Add-ins for Outlook 2 October 31st 06 11:38 AM
2 different send pages Carl R Outlook - General Queries 0 October 21st 06 05:02 PM
How to access built-in property pages? Tadwick Outlook and VBA 2 September 24th 06 07:29 PM
AddIn crashes Outlook 2007 Charles Sinclair Add-ins for Outlook 4 June 1st 06 07:43 PM
Do not display other pages when form is sent [email protected] Outlook - General Queries 1 April 26th 06 11:53 PM


All times are GMT +1. The time now is 09:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.