Link to home
Start Free TrialLog in
Avatar of MJellema
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></head>
<body onload='OnBodyLoad()'>
      <script> function OnBodyLoad()
              {
                  var oApp = window.external.OutlookApplication;
                  TimelogContacts.Initialize(oApp);
              }
      </script>
    <object classid='clsid:6D5EC5A0-3F04-11DE-A97D-F85755D89593' id='TimelogContacts' height='100%'/>
</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;
        }

Open in new window

Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of MJellema
MJellema

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?
ASKER CERTIFIED SOLUTION
Avatar of MJellema
MJellema

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial