PDA

Click to See Complete Forum and Search --> : Outlook Add-In


tward
Nov 14th, 2006, 12:03 PM
OK, I have the Outlook Add-In, it works on the Development machine,
but how do you deploy it now?

It makes a .DLL and I've tried installing that on another machine and registering it and when it starts I get a "Can't Create ActiveX control"....

Can't figure out what I am missing on the Deployment machine!

I looked at [FAQ's: OD] How do I use VB 6 to make an Add-In for an Office application? (http://www.vbforums.com/showthread.php?t=406641&highlight=add-in) but it doesn't really say anything about deployment...

MartinLiss
Nov 14th, 2006, 12:41 PM
Moved.

randem
Nov 14th, 2006, 01:47 PM
You are missing all the dependencies that your program needs....

tward
Nov 14th, 2006, 01:55 PM
You are missing all the dependencies that your program needs....

I of course tried PDW without success...

Also tried manually trying to figure out what exactly I needed but still no go....

My deployment machine has the VBRuntime stuff on it... Dependency check doesn't show anything different than what I already have...

randem
Nov 14th, 2006, 03:22 PM
Check your PM

RobDog888
Nov 14th, 2006, 03:30 PM
You shouldnt need to create a package for an AddIn unless you are using additional resources like ADO or a form with a ocx control etc. What does your AddIn do?

tward
Nov 14th, 2006, 04:10 PM
You shouldnt need to create a package for an AddIn unless you are using additional resources like ADO or a form with a ocx control etc. What does your AddIn do?

That is what I thought as well. It is not real complicated. It simply checks to make sure that the Subject Line is not blank before sending the message. If it is blank it displays a messagebox and cancels the send.

RobDog888
Nov 14th, 2006, 04:35 PM
Then perhaps its a Outlook version issue. Is the target system running the same version of Outlook?

tward
Nov 15th, 2006, 06:20 AM
Then perhaps its a Outlook version issue. Is the target system running the same version of Outlook?

Deployment machine has 11.8010.8107 SP2
Development machine has 11.6568.6568 SP2

Guess I have to try and track down exactly where the

"Run-time error '429':

ActiveX component can't create object

is comming from......

tward
Nov 15th, 2006, 07:10 AM
Can't figure out exactly what I am doing wrong.

Something stupid, I'm guessing...

tward
Nov 15th, 2006, 10:59 AM
One more bit of information, the Add-In causes an Error the first time it is used, as long as I trap the error, it will work the second time....

Funny that it works fine on the development machine, that is why I thought it was a deployment problem, may be more of a problem with the add-in code itself..

RobDog888
Nov 15th, 2006, 02:51 PM
Well if its working the second time then its not missing any references then. I'll look through your code.

RobDog888
Nov 15th, 2006, 02:56 PM
Sure he did. Post #1 and #9. ;)

randem
Nov 15th, 2006, 02:57 PM
Then that would be you attempt to use the control before you create it and by the second time you actually create it. Are you creating controls dynamically?

RobDog888
Nov 15th, 2006, 02:58 PM
Right, but i dont see anything yet that looks like that would be the case.

RobDog888
Nov 15th, 2006, 03:02 PM
Worked perfect the very first time for me. 11.8010.8107 SP2

randem
Nov 15th, 2006, 03:05 PM
Ok, So how does one use this Add-In to test it?

randem
Nov 15th, 2006, 03:10 PM
Works perfectly for me also...

RobDog888
Nov 15th, 2006, 03:11 PM
To debug/test an AddIn you need to open the project, add a breakpoint on the OnConnection sub, then in the project properties choose "Start program" under the debugging tab, and select the path to your outlook.exe, then Run with full compile. Make sure Outlook is not running first as VB 6 will start it for you. Then you can step through the procedures and test it by creating a test email with no subject.

RobDog888
Nov 15th, 2006, 03:14 PM
@tward... is the error message from the oApp_ItemSend procedure or somewhere else?

tward
Nov 15th, 2006, 04:27 PM
From oApp_ItemSend...

RobDog888
Nov 15th, 2006, 05:19 PM
So then that means that the event if firing and thusly the oApp application object is being initialized from the OnConnection sub correctly. If it wasnt then the event wouldnt first with your oApp_ItemSend in the msgbox title but would be a generic vb error msg.

this is being tested for sending of an email and anot a meeting request or other object? Is word selected as the default email client editor for mail messages?

tward
Nov 16th, 2006, 06:28 AM
Yes, I am testing it when sending an email and Word is the default editor on both machines.

I have actually just tracked it down to the following line that is causing the problem:

frmMessageBox.Show vbModal

Odd... Why would it fail on a form?

I do notice that the first time I press "New" message on the machine with the problem, I get the following error:

"Runtime Error '-214746259 (80004005)'
Method '~' of object '~' failed"

tward
Nov 16th, 2006, 06:33 AM
It will work fine if I use a messagebox instead of my own custom form. The problem is that the messagebox appears behind the email message so it appears to lock outlook up unless you switch to Outlook... Another words the messagebox comes up in front of Outlook instead of the Message....

tward
Nov 16th, 2006, 06:57 AM
This actually fixes it (just hiding the error on the Loading of the form), then showing the form and it seems to work..

Don't really know why I get that error on trying to load a form..

RobDog888
Nov 16th, 2006, 10:55 AM
There are other ways to set the form as TopMost so it doesnt interfere with Outlook, but we both tested it out and we didnt get that error. Could it be a bug in that version of Outlook? It doesnt appear to be patched with the latest updates.

tward
Nov 16th, 2006, 11:12 AM
I would have liked to use just a standard msgbox command, but that is the one that comes up behind the mail window...

A bug with my development Outlook?

The deployment machine is the same version that you said it worked on for you....

The error had to do with simply loading the form though....

I can't explain what is going on, but ignoring the error (which I don't usually like to do) when I do the Load frmMessageBox, causes the frmMessageBox.Show vbModal to work fine!

RobDog888
Nov 16th, 2006, 11:14 AM
What about loading the form but not showing it until you need to display it?

Load Form1

tward
Nov 16th, 2006, 11:35 AM
That is what the new version I attached is doing....

The load causes the error I was getting, but I just ignore it and then Show in Modally which seems to work just fine...

RobDog888
Nov 16th, 2006, 11:40 AM
Oh well at least its working for you now. Just wondering why it doesnt work under your target system yet works on ours. :(

tward
Nov 16th, 2006, 11:52 AM
Wish I knew..... :)