index > Visual Studio Tools for Office > Modifying the Office 2007 Ribbon

Modifying the Office 2007 Ribbon


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>

Koluns81
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.
Koluns81
reply 2

You can use google to search for other answers

 

More Articles

How to generate XSLT file from WordProcessingML.xml word document...
&quot;The project cannot be created&quot; error trying to...
OutLook 2003 CommandBarButton doesn't display correctly when MS-W...
How can I load VSTO project from Winform Application?
VSTO 2005 and Outlook 2007?
Microsoft Office Projects Not Viewable
Using Computer.Clipboard And Excel
EUROTOOL problem
How to Freeze Worksheet Panes (C#)
VSTO 2005 SE Problems on Vista RC1 & 2007 Office
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

NamedRanges....weird
Customizing a Smart Tag menu?
Disappearing Document ActionTask Panes w…
ServerDocument failure dependant on the …
Problems with views-XML and heading/user…
AddIn with a dialogBox for ms-word (C++)
hiding menus
Showing Error while running the Setup
Cannot create project
BMove won't work in Exchange if using pe…
How to create XMLNodes on runtime -word?
Double-click on Windows Form control ope…
Grant full trust using setup project
Question about install Outlook Addin wri…
Smart Tags and Stock Quotes

Hot Articles

Convert to VSTO - (EXCEL)
Install vsto 2005
How to use DataConnections in Infopath 2…
How to get IWin32Window for Show/ShowDia…
Change Word formfield checkbox value
TrackChanges Issue
Creating tab delimited text files form e…
Excel 2007 Beta Charting Problem/Question
Word document Page count, word count, pa…
MS Office 2003 COM Add-Ins not working p…
Help on exporting data from C# 2005 to a…
Creating Excel Report file From VB.Net 2…
Standard not suppoted!!!!!
How to read data from external applicati…
Hosting a web page in Action Pane (MS Wo…

Recommend Articles

newbie ? Access 2003 Developer Extensions
Order of selection events with Bookmark …
VS2005 errors after upgrade from VSTO v3…
Why is a hidden VSTO document grabbing i…
Publishing Problem.....
Question re the CRM Integration Add-In S…
Reply as plain text
Trying to set focus on the sheet result …
VSTO 2005 SE Outlook Form Regions, CTP a…
rounding chart corners in Excel
Programmtically show / hide xml tags in …
Display office documents in my windows f…
VSTO training
Help to surpress group subtotal in excel…
Server Data Scenarios