MJellema
asked on
ClickOnce deployment doesn't handle registration COM User Control
I have a VS2008 solution building a Outlook 2007 add-in. This add-in will create a new folder in Outlook with a asp page as home page. On this ASP a scriptis run, referencing a custom control loading data from SQLExpress.
When published on the development machine the Custom Control is registered and the Add-in works fine.
When deployment is run on target machine, the add-in installs but the script returns an error saying the Custom Control method called doesn't exists.
Attached code is from the User Control TimelogContact showing the Initialize code that is not accessible from page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title></title></hea d>
<body onload='OnBodyLoad()'>
<script> function OnBodyLoad()
{
var oApp = window.external.OutlookApp lication;
TimelogContacts.Initialize (oApp);
}
</script>
<object classid='clsid:6D5EC5A0-3F 04-11DE-A9 7D-F85755D 89593' id='TimelogContacts' height='100%'/>
</body>
</html>
When published on the development machine the Custom Control is registered and the Add-in works fine.
When deployment is run on target machine, the add-in installs but the script returns an error saying the Custom Control method called doesn't exists.
Attached code is from the User Control TimelogContact showing the Initialize code that is not accessible from page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title></title></hea
<body onload='OnBodyLoad()'>
<script> function OnBodyLoad()
{
var oApp = window.external.OutlookApp
TimelogContacts.Initialize
}
</script>
<object classid='clsid:6D5EC5A0-3F
</body>
</html>
using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using MSOutlook = Microsoft.Office.Interop.Outlook;
using Word = Microsoft.Office.Interop.Word;
using Excel = Microsoft.Office.Interop.Excel;
namespace TimelogAddIn
{
[ComVisible(true)]
[Guid("6D5EC5A0-3F04-11DE-A97D-F85755D89593")]
public partial class TimelogContacts : UserControl
{
public event LoginAttemptEventHandler LoginAttempt;
public delegate void LoginAttemptEventHandler(bool success, string siteCode, string apiInitials, string apiPassword);
private TimelogAddIn.APILoginCredentials loginCredentials;
private System.Globalization.CultureInfo _oldCI;
public Word.Application _wordApp;
private Excel.Application _excelApp;
private string _dir = "";
private string _proj = "";
// private string _cust = "";
private object _oMissing = System.Reflection.Missing.Value;
MSOutlook.Application _app = null;
[ComVisible(true)]
public void Initialize(MSOutlook.Application o)
{
_app = (MSOutlook.Application)o;
}
ASKER
Dear CodeCruiser,
Thank you for posting these links but I cannot see any solutions in them for my problem. Main reasons are all articles talk about Visual Studio 2005 (SE) and non address the clickOnce way to setup a COM add-in.
Any other parts on the web to look for an answer?
Thank you for posting these links but I cannot see any solutions in them for my problem. Main reasons are all articles talk about Visual Studio 2005 (SE) and non address the clickOnce way to setup a COM add-in.
Any other parts on the web to look for an answer?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://xldennis.wordpress.com/2007/03/10/creating-and-deploying-managed-com-add-ins-with-vsto-2005-se-part-vii/
https://www.experts-exchange.com/questions/22102192/how-to-deploy-outlook-add-in-in-Visual-studio-tools-for-office.html?sfQueryTermInfo=1+10+addin+deploi+offic