Uninstall VSTO Outlook Add-In while Outlook remains open - outlook

I have created my VSTO Add-In installer using "ClickOnce". I am using "VSTOInstaller.exe" to install and uninstall using PowerShell script. The uninstallation works fine when the Outlook is not running. However, when it is running, even though uninstall does not show any error, it does not uninstall the add-in. None of the relevant registry entries are deleted. Is there any "force" option to uninstall it? How can it be done when Outlook is up and running?

I think forcefully closing outlook will not solve your problem as maybe user is working on some mails and if you close it forcefully user will loss unsaved mails.
However, if you still want to do it.
you can create a new form along with your project
and use this code
if (System.Diagnostics.Process.GetProcessesByName("OUTLOOK").Length > 0)
{
System.Diagnostics.Process proc = System.Diagnostics.Process.GetProcessesByName("OUTLOOK")[0];
proc.Kill();
}
Otherwise you can put a popup to tell user to close the outlook from its end so that user can save its already opened work before closing outlook.

Related

Custom properties are not being saved immediately to Exchange Server in Outlook desktop 2016

My Outlook web add-in saves emails to an external application.Upon save, it will also write some custom information to exchange server using Office.js's customProps.saveAsync();. So next time the user open the same email, the add-in will look up the properties and if it is not null will remind the user the email has been saved.
Work like a charm in web browser(Office 365).
However in Windows Outlook desktop, the function performs strangely. If I save the email and then immediately move the email to another folder. The customProps.saveAsync(); will fail(nothing saved to exchange server). However, if I re-launch the add-in on the email before moving out to another folder, the custom info will be saved successfully.
Seems to me on Outlook desktop the custom properties will not be written to the exchange server immediately, instead, it will wait until it is being triggered(re-launch add-in etc I do not know the exact mechanism). However, if the email being moved to another folder right after being saved in an add-in, the pending function will be lost.
I found this describing seemingly similar behavior. So I then turned off the "cache" mode in outlook but the problem persisted.
I also tried using EWS's API to perform the "save custom properties", but the problem still persisted.
Am I missing somethinghere or it is Outlook desktop's bug?
You are not missing something - this is definitely a bug in Outlook Desktop. Thank you for reporting the issue. We are investigating and will work on a fix as quickly as we can.
As a workaround in the interim, you can switch messages within the same folder in order to trigger a save. The workaround you found of re-opening an Add-in may also work.

Inactive outlook add in becoming active in Outlook 2010

We have an outlook add in with load behaviour defaulted as 9.
Initial loading of the add in is working. Now the user can go and make the add in inactive. In this case the load behaviour rightly becomes 8. In the current session of the outlook it remains so.
But once inactive and user starts outlook again, the add in becomes active and is loaded again. So the load behaviour becomes 9 again.
This problem is only observed in Outlook 2010 professional version. In outlook 2013 it is working fine.
Is there any way i can found out why it is happening or does anyone have any hints ?
cheers,
Saurav
When users try to disable add-ins (registered in the HKLM hive) in Office applications they get the LoadBehavior key created in the HKCU hive. Try to change LoadBehavior key value in the HKLM hive of windows registry instead and see the result.

Not Showing Outlook Addin

I have created outlook addin for Outlook 2013 64 bit.
In that Addin, i have created Form region with custom controls.
Then with the reference of http://blogs.msdn.com/b/emeamsgdev/archive/2013/11/21/outlook-deploying-an-outlook-2013-add-in-using-installshield-le.aspx i created setup file for Addin.
Now i installed it in my computer and everything works fine.
However when i try to install it on client computer, it doesn't show addin in outlook.
and i am not able to find any reason.?
I have also created registry for my addins
If it simply doesn't load, without errors, it only means one thing, outlook is unaware of your addin, cause even when addins are not working, outlook gives you an error or turns the LoadBehaviour regkey to '2'.
On your client, you should check that the registry values are set properly.
**HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\Outlook_PROJECT_ADDIN
If your addin doesn't work, check to see if those values exist, and if they do, what happens when outlook loads ? does LoadBehavior turns to '2' instead of 3 ?
If so, and it works perfectly on your pc, it probably means you have issues with the Manifest regkey, make sure the manifest points to a valid local location followed by a |vstolocal
so its syntax should be something like:
file:///C:/Outlook_Proj.vsto|vstolocal
Also make sure you have .Net Framework v4.0 installed on your target PC.
If you're trying to install it to a network drive, make sure you remove the '|vstolocal| thingy, and add the network drive to the trusted zone in Internet Explorer Settings.
Hope the following steps will help you solve this problem if you are still facing it.
Run the deployed setup with administration rights.
If it is not shown under Add-ins, open the setup folder and double click on the .vsto file then select install.
If you can see the addin among the others, and is not functioning it means it is disabled. To enable the add-in(since you are using outlook 2013), go to File -> Slow and Disabled Add-ins, and you shold see your add-in on the pop-upped window. Enable it.
Create the VSTO_SUPRESSDISPLAYALERTS = 0 enviorment variable to get any VSTO alerts. Take a look in the Windows event viewer and off course be sure of being installed the pre requisistes like Office Primary assembles and VSTO for office. Another think, check if your adding was not crashed once and move to inactive add-in list. Search registry for Resiliency key.

Outlook add-in creating spurious folders in new PSTs

I'm maintaining an Outlook 2010 addin produced by my company. Some of our clients have reported that spurious folders named &Dont prompt me about this again., &Dont prompt me about this again.1, &Dont prompt me about this again.2, etc. are appearing. I was able to duplicate this issue by creating a new PST file; each time I re-open Outlook, a new folder is created.
Some research indicates that people have reported similar issues with Outlook Social Connector and the Norton Antispam Outlook Addin. I verified that neither of the above is causing our issue. It seems to me that this is an issue among Outlook add-ins. Is there something we can do to fix it in our Outlook add-in?
When you execute the method 'GetDefaultFolder' with any value, if the folder doesn't exist in the new .pst file, the Outlook create it:
Outlook.NameSpace ns = OutlookApp.Session;
Outlook.Store store = ns.Stores[1];
store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);
Sometimes, for no reason, the Outlook creates strange folders, like in my question:
Outlook.Store.GetDefaultFolder creates a stranger folder
I'm still dont understand why...

Deployed Outlook addin not loaded

I cannot get my Outlook addin to work in release mode for OL2007 (debug works great). I created a ClickOnce installer, signed it with a custom certificate and built the installer.
Then after installation when I start Outlook 2007, it does not load and gives no notification at all. I look into the addin section where I find my addin among "inactive addins". I look to the COM addins and find it unchecked (checking it doesn't help) with the notification "Not loaded" (NOTHING ELSE).
Things I tried already:
try/catch block around my startup routine plus message output: nothing is shown
new custom signing certificate: useless
APPDATA\MS\Outlook\extend.dat deleted: to no avail
regedit setting "LoadBehaviour" 3: It is always like that, I don't have to change it
VSTO_SUPPRESSDISPLAYALERTS = 0: to no avail, nothing is shown
VSTO_LOGALERTS = 1: same here, nothing is logged
Fusion Logging: nothing is posted into the output directory
I get NO info at all what causes my addin not to load. It is driving me crazy. Can anyone point me to a solution or at least something I can still try to solve this problem?
The problem obviously occurred due to a difference between GUID and setup product key. Changing the setup product key to match the GUID enabled the addin to complain about errors again, so I could continue with debugging.
Very weird that in this case no error whatsoever was thrown.

Resources