Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   setup project: how to add a custom form and make the form as default (http://www.outlookbanter.com/add-ins-outlook/87001-setup-project-how-add-custom.html)

Jason February 27th 09 08:23 PM

setup project: how to add a custom form and make the form as default
 
How do I deploy a custom form through Outlook add-in setup? I wrote custom
code for windows service installtion but I don't know this add-in thing.

I know how to make the form as default by setting registry. Can I add those
registry values to the existing entries on the setup project registry tab?



Jason March 1st 09 09:10 PM

setup project: how to add a custom form and make the form as default
 
I figured out the first question. Now I can publish a form from msi.However
it has problem, the outlook.exe does not terminate, even after
System.Runtime.InteropServices.Marshal.ReleaseComO bject(app).


Still have problem in default form setting. I'll create a new thread.

"Jason" wrote in message
...
How do I deploy a custom form through Outlook add-in setup? I wrote custom
code for windows service installtion but I don't know this add-in thing.

I know how to make the form as default by setting registry. Can I add
those registry values to the existing entries on the setup project
registry tab?




Ken Slovak - [MVP - Outlook] March 2nd 09 04:54 PM

setup project: how to add a custom form and make the form as default
 
Are you creating an Outlook process? If so and Outlook wasn't running before
you did that you need to use app.Quit() to shut down Outlook before
releasing the app object. Make sure all of your other Outlook objects are
released before you call Quit(), then release app.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
I figured out the first question. Now I can publish a form from msi.However
it has problem, the outlook.exe does not terminate, even after
System.Runtime.InteropServices.Marshal.ReleaseCom Object(app).


Still have problem in default form setting. I'll create a new thread.

"Jason" wrote in message
...
How do I deploy a custom form through Outlook add-in setup? I wrote
custom code for windows service installtion but I don't know this add-in
thing.

I know how to make the form as default by setting registry. Can I add
those registry values to the existing entries on the setup project
registry tab?





Jason March 2nd 09 06:32 PM

setup project: how to add a custom form and make the form as default
 
Did not work. All variables were set to null before app.QUit() was issued. I
even used scope

Outlook.Application app = new Outlook.Application();

{
...
}

app.Quit();

System.Runtime.InteropServices.Marshal.ReleaseComO bject(app);


May be MSI package and installer class work differently.

Anyway I gave up. I moved the publish function to the setup form inside
add-in. User has to provide some info before they can use the add-in.


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Are you creating an Outlook process? If so and Outlook wasn't running
before you did that you need to use app.Quit() to shut down Outlook before
releasing the app object. Make sure all of your other Outlook objects are
released before you call Quit(), then release app.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
I figured out the first question. Now I can publish a form from
msi.However it has problem, the outlook.exe does not terminate, even after
System.Runtime.InteropServices.Marshal.ReleaseCo mObject(app).


Still have problem in default form setting. I'll create a new thread.

"Jason" wrote in message
...
How do I deploy a custom form through Outlook add-in setup? I wrote
custom code for windows service installtion but I don't know this add-in
thing.

I know how to make the form as default by setting registry. Can I add
those registry values to the existing entries on the setup project
registry tab?







Ken Slovak - [MVP - Outlook] March 2nd 09 07:03 PM

setup project: how to add a custom form and make the form as default
 
In managed code setting an object to null does not necessarily release the
RCW, that's only after the GC runs at some undetermined time. To fully
release objects call Marshal.ReleaseComObject() on the object and if
necessary call it in a loop until the return int is 0.

FWIW, if I have an addin I do my form publishing in the addin code on first
run and never during installation.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
Did not work. All variables were set to null before app.QUit() was issued.
I even used scope

Outlook.Application app = new Outlook.Application();

{
...
}

app.Quit();

System.Runtime.InteropServices.Marshal.ReleaseComO bject(app);


May be MSI package and installer class work differently.

Anyway I gave up. I moved the publish function to the setup form inside
add-in. User has to provide some info before they can use the add-in.



Jason March 3rd 09 06:57 AM

setup project: how to add a custom form and make the form as default
 
Thought about that but don't want to have that kind of trouble. Do the
publish in the first run or until it is needed is better idea.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
In managed code setting an object to null does not necessarily release the
RCW, that's only after the GC runs at some undetermined time. To fully
release objects call Marshal.ReleaseComObject() on the object and if
necessary call it in a loop until the return int is 0.

FWIW, if I have an addin I do my form publishing in the addin code on
first run and never during installation.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Jason" wrote in message
...
Did not work. All variables were set to null before app.QUit() was
issued. I even used scope

Outlook.Application app = new Outlook.Application();

{
...
}

app.Quit();

System.Runtime.InteropServices.Marshal.ReleaseComO bject(app);


May be MSI package and installer class work differently.

Anyway I gave up. I moved the publish function to the setup form inside
add-in. User has to provide some info before they can use the add-in.






All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com