Bonjour tout le monde,

J'ai fais un nouveau projet (Complément Word 2003) dans VS 2008. Danc ce projet, automatiquement j'ai un WordAddIn2003Installation. Dans ce projet il n'y a pas grand chose j'ai fais un event qui affiche une boite de dialogue.
Quand je debug dans VS il ouvre bien word et j'ai bien ma boite de dialogue, en revanche quand j'installe l'add-in à partir du setup et que j'ouvre word je n'ai rien.
Ma question étant est-ce qu'il y a autre chose à faire pour activer cet add-in ? J'ai regardé dans la registry et j'ai bien :

HKEY_CURRENT_USER\Software\Microsoft\Office\Word\Addins\WordAddIn2003
Le LoadBehavior est à 3.
En revanche dans le local machine je n'ai rien.

Le setup a créé un dossier dans Program Files\nom du projet et dedans j'ai une dll et un manifest.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Windows.Forms;
using Microsoft.VisualStudio.Tools.Applications.Runtime;
using Word = Microsoft.Office.Interop.Word;
using Office = Microsoft.Office.Core;
using Microsoft.Win32;
 
namespace WordAddIn2003
{
    public partial class ThisAddIn
    {
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
        }
        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }
        void Application_DocumentChange()
        {
            MessageBox.Show("Test");
        }
        #region Code généré par VSTO
        /// <summary>
        /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
        /// le contenu de cette méthode avec l'éditeur de code.
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
            this.Application.DocumentChange += new Microsoft.Office.Interop.Word.ApplicationEvents4_DocumentChangeEventHandler(Application_DocumentChange);
        }
        #endregion
    }
}