PC Review


Reply
Thread Tools Rate Thread

Accesing a comm addin instance from VB Script

 
 
Gabriel Ciuloaica
Guest
Posts: n/a
 
      5th Jan 2005
Hi,

I have a problem that I could not rezolve it. I have done an add-in in
VC++. The addin is working well. When I try to accees it from VB script
from a html page that is show by the OLK folder the Object property is
"Nothing" all the time.

Here is code from VB Script:
dim app
set app = window.external.OutlookApplication
dim addin
set addin = app.COMAddIns.Item("swyxClientOLK.swyxAddin")
dim ng1
set ng1 = addin.Object

ng1 is Nothing all the time.

What could be the problem ?

Thanks,
Gabi
 
Reply With Quote
 
 
 
 
Ken Slovak
Guest
Posts: n/a
 
      5th Jan 2005
I usually use something like this myself:

set ng1 = app.COMAddIns("swyxClientOLK.swyxAddin").Object

Not sure if that would make a difference for you...

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


"Gabriel Ciuloaica" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
>
> I have a problem that I could not rezolve it. I have done an add-in in
> VC++. The addin is working well. When I try to accees it from VB script
> from a html page that is show by the OLK folder the Object property is
> "Nothing" all the time.
>
> Here is code from VB Script:
> dim app
> set app = window.external.OutlookApplication
> dim addin
> set addin = app.COMAddIns.Item("swyxClientOLK.swyxAddin")
> dim ng1
> set ng1 = addin.Object
>
> ng1 is Nothing all the time.
>
> What could be the problem ?
>
> Thanks,
> Gabi


 
Reply With Quote
 
 
 
 
Gabriel Ciuloaica
Guest
Posts: n/a
 
      5th Jan 2005
Ken Slovak wrote:
> I usually use something like this myself:
>
> set ng1 = app.COMAddIns("swyxClientOLK.swyxAddin").Object
>
> Not sure if that would make a difference for you...
>

Hi Ken,

Thanks for the answer but it doesn't help me at all. COMAddIns Object
has a Item property that should be used to get the addin instance.

 
Reply With Quote
 
Ken Slovak
Guest
Posts: n/a
 
      5th Jan 2005
Did you even try what I suggested? I use the code I showed all the time
without Item and always get the COM addin object I want.

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


"Gabriel Ciuloaica" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ken Slovak wrote:
>> I usually use something like this myself:
>>
>> set ng1 = app.COMAddIns("swyxClientOLK.swyxAddin").Object
>>
>> Not sure if that would make a difference for you...
>>

> Hi Ken,
>
> Thanks for the answer but it doesn't help me at all. COMAddIns Object has
> a Item property that should be used to get the addin instance.
>


 
Reply With Quote
 
Gabriel Ciuloaica
Guest
Posts: n/a
 
      5th Jan 2005
Ken Slovak wrote:
> Did you even try what I suggested? I use the code I showed all the time
> without Item and always get the COM addin object I want.
>

Sure I've tryed. It shows me the following error:
"Wrong number of arguments or Invalid property assignment" for ComAddIns.

Thanks,
Gabi
 
Reply With Quote
 
Gabriel Ciuloaica
Guest
Posts: n/a
 
      5th Jan 2005
Gabriel Ciuloaica wrote:
> Ken Slovak wrote:
>
>> Did you even try what I suggested? I use the code I showed all the
>> time without Item and always get the COM addin object I want.
>>

> Sure I've tryed. It shows me the following error:
> "Wrong number of arguments or Invalid property assignment" for ComAddIns.
>
> Thanks,
> Gabi


Anyway, I suspect that the problem is in the addin. In addin I have
multiple interfaces. If I use another interface from VBScript using
CreateObject() then the instance is created correctly for that interface
and I can call interface methods without a problem.

I suspect that the problem is in OnConnection method implementation in
VC addin code. The third parameter that is the AddinInstace is not saved
This could be the issue but I'm not sure.

Thanks,
Gabi
 
Reply With Quote
 
Ken Slovak
Guest
Posts: n/a
 
      6th Jan 2005
In that case you might have to use a separate addin for Outlook and not try
to mix it with support for other applications. In mixed use addins I've done
I have shared the same addin among Word, Excel and PPT but have always kept
my Outlook addins separate.

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


"Gabriel Ciuloaica" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Gabriel Ciuloaica wrote:
>> Ken Slovak wrote:
>>
>>> Did you even try what I suggested? I use the code I showed all the time
>>> without Item and always get the COM addin object I want.
>>>

>> Sure I've tryed. It shows me the following error:
>> "Wrong number of arguments or Invalid property assignment" for ComAddIns.
>>
>> Thanks,
>> Gabi

>
> Anyway, I suspect that the problem is in the addin. In addin I have
> multiple interfaces. If I use another interface from VBScript using
> CreateObject() then the instance is created correctly for that interface
> and I can call interface methods without a problem.
>
> I suspect that the problem is in OnConnection method implementation in VC
> addin code. The third parameter that is the AddinInstace is not saved
> This could be the issue but I'm not sure.
>
> Thanks,
> Gabi


 
Reply With Quote
 
Tom Rizzo [MSFT]
Guest
Posts: n/a
 
      10th Jan 2005
Also, check out http://support.microsoft.com/?kbid=240768

I don't know if this was fixed beyond Outlook 2000.

Tom

--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp



"Ken Slovak" <(E-Mail Removed)> wrote in message
news:eJsxM7$(E-Mail Removed)...
> In that case you might have to use a separate addin for Outlook and not
> try to mix it with support for other applications. In mixed use addins
> I've done I have shared the same addin among Word, Excel and PPT but have
> always kept my Outlook addins separate.
>
> --
> 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
>
>
> "Gabriel Ciuloaica" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Gabriel Ciuloaica wrote:
>>> Ken Slovak wrote:
>>>
>>>> Did you even try what I suggested? I use the code I showed all the time
>>>> without Item and always get the COM addin object I want.
>>>>
>>> Sure I've tryed. It shows me the following error:
>>> "Wrong number of arguments or Invalid property assignment" for
>>> ComAddIns.
>>>
>>> Thanks,
>>> Gabi

>>
>> Anyway, I suspect that the problem is in the addin. In addin I have
>> multiple interfaces. If I use another interface from VBScript using
>> CreateObject() then the instance is created correctly for that interface
>> and I can call interface methods without a problem.
>>
>> I suspect that the problem is in OnConnection method implementation in VC
>> addin code. The third parameter that is the AddinInstace is not saved
>> This could be the issue but I'm not sure.
>>
>> Thanks,
>> Gabi

>



 
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
Can't get rid of a specific Excel addin in MSIE - I managed to get rid of it in Excel but not in the excel addin for ie WMB Windows XP Internet Explorer 0 20th Apr 2005 06:43 PM
Can I use serial comm port in Excel VB script? bt.newsgroup.com.hk Microsoft Excel Programming 3 20th May 2004 09:07 AM
Removing an addin from the addin's list dialog Jim Bassett Microsoft Excel Programming 0 12th Jan 2004 04:11 PM
Remove Excel AddIn from AddIn List !! Help carl Microsoft Excel Programming 2 8th Dec 2003 04:36 PM
howtofix excel 2000 says invalid AddIn for valid excel97 AddIn robm Microsoft Excel Discussion 0 24th Sep 2003 06:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:04 PM.