My new Ribbon .com addin won't load

D

David

I have created a new project and im trying to follow Ted Pattison's "Office
Developer Screencast" for creating your own ribbon. Im upto the stage of
running the setup program and checking to see if the new ribbon loads but it
lists the COM add-in under the Inactive section and when you try to add the
DLL manually it says "this is no a valid office addin". Any ideas? I have a
fresh install of XP with Visual Studio 2005, Office Beta 2 with Technical
Refresh. I haven't installed the latest SDK or Office Beta Tools as i don't
think at this stage i need them.

namespace TestMacros

{

using System;

using Extensibility;

using System.Runtime.InteropServices;

using Microsoft.Office.Core;

using System.Reflection;

using System.IO;





[GuidAttribute("1E5B1562-A0EF-47B9-9AE5-D3D575A3E82A"),
ProgId("DPPMacros.Connect")]

public class Connect : Object, Extensibility.IDTExtensibility2,
IRibbonExtensibility

{

public Connect()

{

}



public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)

{

applicationObject = application;

addInInstance = addInInst;

}



public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode,
ref System.Array custom)

{

}



public void OnAddInsUpdate(ref System.Array custom)

{

}



public void OnStartupComplete(ref System.Array custom)

{

}



public void OnBeginShutdown(ref System.Array custom)

{

}

private object applicationObject;

private object addInInstance;





#region IRibbonExtensibility Members

public string GetCustomUI(string RibbonID)

{

Assembly asm = Assembly.GetExecutingAssembly();

Stream stream =
asm.GetManifestResourceStream("TestMacros.Resources.TestMacros.xml");

StreamReader reader = new StreamReader(stream);

string ribbon = reader.ReadToEnd();

reader.Close();

stream.Close();

return ribbon;



}

#endregion

}

}



*****XML File********

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

<ribbon>

<tabs>

<tab id="TabTestMacros" label="DPP">

<group id="grpTestMarcos" label="DPP2">

<button id="cmdSmilieFace" imageMso="New" label="test" size="normal"
onAction="loadMacros" />

</group>

</tab>

</tabs>

</ribbon>

</customUI>
 
D

David

I have answered my own question, i needed to have .Net Program Ability
Support installed for the applications i want to modify. Just modify Office
Installation and say install this option for each program you wish your
ribbon to work in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top