Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / August 2004

Tip: Looking for answers? Try searching our database.

Property Page in Addin

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nauman Khan - 18 Aug 2004 07:56 GMT
Hi!

I'm writting my Outlook Adding using VC6 and ATL. And now I
experienced problem when trying to add my addin's property page to
Tools->Options notebook.

This how I'm adding page:

void _stdcall OnOptionPagesAdd(IUnknown* Pages)
{
CComQIPtr<Outlook::PropertyPages> spPages(Ctrl);
   ATLASSERT(spPages);

   //ProgId of the propertypage control
   CComVariant varProgId(OLESTR("OutlookAddin.ConfigurationPage"));

   //tab text
   CComBSTR bstrTitle(OLESTR("Account"));
   
   HRESULT hr = spPages->Add((_variant_t)varProgId,(_bstr_t)bstrTitle);
   if(FAILED(hr))
       MessageBox(NULL, _T("Failed adding propertypage"), _T(""), MB_OK);
}

All wokrks fine. I'm able to open Tools->Options and see my page name
between the others. But when I clicking on it, Outlook displays the
following message:

"Unable to display "Account" page. This page will remain visible, but
is not available".

Can anyone help me to solve this problem?

Regards
Nauman
Dmitry Streblechenko \(MVP\) - 18 Aug 2004 18:35 GMT
That means that there was an error initializing your control. What
interfaces does OutlookAddin.ConfigurationPage object implement?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

Hi!

I'm writting my Outlook Adding using VC6 and ATL. And now I
experienced problem when trying to add my addin's property page to
Tools->Options notebook.

This how I'm adding page:

void _stdcall OnOptionPagesAdd(IUnknown* Pages)
{
CComQIPtr<Outlook::PropertyPages> spPages(Ctrl);
   ATLASSERT(spPages);

   //ProgId of the propertypage control
   CComVariant varProgId(OLESTR("OutlookAddin.ConfigurationPage"));

   //tab text
   CComBSTR bstrTitle(OLESTR("Account"));

   HRESULT hr = spPages->Add((_variant_t)varProgId,(_bstr_t)bstrTitle);
   if(FAILED(hr))
       MessageBox(NULL, _T("Failed adding propertypage"), _T(""), MB_OK);
}

All wokrks fine. I'm able to open Tools->Options and see my page name
between the others. But when I clicking on it, Outlook displays the
following message:

"Unable to display "Account" page. This page will remain visible, but
is not available".

Can anyone help me to solve this problem?

Regards
Nauman
Nauman Khan - 20 Aug 2004 11:15 GMT
Hi all,

I have an outlook form, which has some custom controls in addition to To,
Subject, Message fields. IS it possible to do something like this

1- Call a function in Addin and pass all the values on the form to Addin [I
have done it]
2- Create IMessage object, add the values including values for my custom
control values as key/value to that object?
3- Create entry in say Sent folder for these custom messages.

** I am using VC++6 for Development with Outlook 2003 and above.

Please help
Regards
Nauman
Dmitry Streblechenko \(MVP\) - 20 Aug 2004 19:44 GMT
Please create a new thread instead of reusing an old one.
I am not exactly sure what you are trying to do. You can create a new
message in the Sent Items folder usign MAPIFolder.Items.Add. Custom
properties can be added using MailItem.UserProperties collection.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Hi all,
>
[quoted text clipped - 12 lines]
> Regards
> Nauman
Nauman Khan - 23 Aug 2004 13:51 GMT
Thanks for your reply.
I basically create a custom message and send it through my own web server.
But i need to do following

1- If the Message is successfully sent, Create an entry in Sent Folder for
my message
2- If message is not Sent, I will create an entry in "Unsent Messages"
folder.

I tried your suggestion and it seems to work. Just one more explaination -
Once i have saved the Form to the Folder, will these custom properties stay
persistent ? i mean if i open the form in Design Mode from within Outlook, i
see those properties there with their values. This could interrupt with
default functionality of the form, as i am also using it to Create Message
on click on Addin Button.   Any ideas ?

Regards
Nauman

> Please create a new thread instead of reusing an old one.
> I am not exactly sure what you are trying to do. You can create a new
[quoted text clipped - 23 lines]
> > Regards
> > Nauman
Dmitry Streblechenko \(MVP\) - 23 Aug 2004 19:11 GMT
I am not sure what you mean by "Form". Are you designing a custom form?
Everything displayed by a built-in or a custom form is bound to the message.
The data does not exist in a form, only in the messages.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy  - Outlook, CDO
and MAPI Developer Tool

> Thanks for your reply.
> I basically create a custom message and send it through my own web server.
[quoted text clipped - 43 lines]
> > > Regards
> > > Nauman
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.