PC Review


Reply
Thread Tools Rate Thread

Office::COMAddIn::put_Connect not working under VISTA

 
 
Gancev
Guest
Posts: n/a
 
      21st Jul 2008
Hi All,

I add my code below. The problem is that in Vista the function
put_connected is not working.
On Windows XP is working in all combination.On Windows Vista if I start
Outlook with "Run as admin" it works, otherwise not.
I used the link http://msdn.microsoft.com/en-us/library/bb386106.aspx and
copy all keys from Local to current user but still not working until I
delete this reg key
:"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\OneNote.OutlookAddin.12"
My purpose is to disable One Note add in for specific messages only, and
the solution should work even if user start Outlook without using "Run as"

void DisableOneNoteAddin(bool state){
CComPtr<Outlook::_Application> spApp = GetMainApplication();
CComPtr<Office::COMAddIns> spAddins;
CComPtr<Office::COMAddIn> spAddin;
spApp->get_COMAddIns(&spAddins);
if(spAddins){
long numaddins;
spAddins->get_Count(&numaddins);
if(numaddins>0){
for(int i = 1; i<=numaddins; i++){
CComBSTR name;
VARIANT var = CComVariant(i);
spAddin =spAddins->Item(&var);
spAddin->get_Description(&name);
if(name == _T("OneNote Notes about OutlookItems"))
{
if(state) spAddin->put_Connect(VARIANT_FALSE);
else spAddin->put_Connect(VARIANT_TRUE);
}
}}}}

THANKS,
Stojan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Office::COMAddIn::put_connected NOT WORKING under VIsta Gancev Microsoft Outlook Program Addins 1 21st Jul 2008 04:04 PM
I find that Office 97 is not working on Vista yorkmak Windows Vista General Discussion 3 24th Apr 2008 04:13 AM
Ditributing ComAddin's & ActiveX-dll's in Vista Peter T Microsoft Excel Programming 0 6th Nov 2007 03:13 PM
Windows Vista working with office. =?Utf-8?B?TWFyayBH?= Windows Vista General Discussion 2 11th Jun 2007 07:18 PM
Office 2007 not working (on Vista) =?Utf-8?B?SnVsaWU=?= Windows Vista Installation 1 9th May 2007 03:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 PM.