## idMso and msoImage ID’s for Office 2013 custom Ribbons

Very hard to find…

Image IDs – msoImage
Microsoft Office Document: [MS-CUSTOMUI2] Supporting Documentation

All Commands – idMso
Office 2013 Help Files: Office Fluent User Interface Control Identifiers

RibbonCreator tool

http://www.ribboncreator2013.de/en/

Export Office Icons tool

https://imagemso.codeplex.com/

Tagged , , , , ,

## Compare Excel, Word and PDF Files in Visual Studio Team Foundation Server 2010

This post could be interessting for you, if you get the message “Binary files differ” in Visual Studio.

Comparing two files is a common task for a developer. When using Team Foundation Server as source control, it is very comfortable using Visual Studio’s built-in compare feature for file history. However when comparing Office documents like Word (.doc, .docx), Excel (.xls, .xlsx) or even .pdf things become difficult. The only information you will get is that files are different. It is not possible to see the differences as it is possible in the way of simple text code files.

## How Office documents can be compared?

To compare these file types you need another diff tool that is able to compare that files and integrate it in your Visual Studio. I’m using WinMerge which is cost free and comes with a lot of plugins.

## 1. WinMerge with xdocdiff Plugin

At first you need to download WinMerge and xdocdiff Plugin. WinMerge is a very good and common tool to compare files. The xdocdiff Plugin enables WinMerge to compare Microsoft Office documents.

http://winmerge.org/

http://freemind.s57.xrea.com/xdocdiffPlugin/en/index.html

Please read the installation guide of xdocdiff to configure the plugin in WinMerge.

xdocdiff supported file formats

• .rtf – Rich Text
• .docx/.docm – Microsoft WORD 2007(OOXML)
• .xlsx/.xlsm – Microsoft Excel 2007(OOXML)
• .pptx/.pptm – Microsoft PowerPoint 2007(OOXML)
• .doc – Microsoft WORD ver5.0/95/97/2000/XP/2003
• .xls – Microsoft Excel ver5.0/95/97/2000/XP/2003
• .ppt – Microsoft PowerPoint 97/2000/XP/2003
• .sxw/.sxc/.sxi/.sxd – OpenOffice.org
• .odt/.ods/.odp/.odg – Open Document
• .wj2/wj3/wk3/wk4/123 – Lotus 123
• .wri – Windows3.1 Write
• .mht – Web Archive
• .eml – Exported files from OutlookExpress

## 2. Ensure WinMerge and xdocdiff is working

To ensure that everything is working you should compare two Office documents using WinMerge manually.

## 3. Configure Visual Studio 2010 to use WinMerge

Go to Visual Studio / Options / Source Control / Visual Studio Team Server

Use the following settings to configure WinMerge to act as compare tool.
 Extension: .doc,.docx,.xls,.xlsx,.pdf Command: C:\Program Files\WinMerge\WinMergeU.exe Arguments: /x /e /ub /wl /dl %6 /dr %7 %1 %2
In the Extension field you can add all xdocdiff supported formats from above.

## 4. Test Compare feature

Here I’m using a simple Excel file that looks like this…

In the Source Control Explorer of VS navigate to a controlled Excel document, view the History and click Compare.

## 5. Compare Result

WinMerge will open automatically and show the difference of the two versions.

## Sheet Switch AddIn for Excel 2010 – Switch between a lot of Sheets

Office 2010 and Office 2013 Only – Please note that the solution here works with Office 2010 and Office 2013

Last year I worked in a specification team for a few month and did a lot in Office Word and Excel. We had one Excel File that contained about 100 Sheets. Switching between the sheets was a very time consuming task. Excel does not offer a comfortable way to navigate, when not all Sheets can be displayed in the navigation bar on the bottom of the Excel window.

Let’s come to look closer, what I mean

Only 5 Sheets are visibile all others are hidden. You must scroll to reach them.

Right-Click to the Sheet-Scrollbar shows the following screen

Using this feature you can switch between the first 15 sheets. This way is acceptable, if you don’t have more that 15 Sheets in your Workbook. Let’s take a more closer look to the “More Sheets…” Option here.

You can see only 12 Sheets by default. To reach more you need to scroll down. The dialog is not realizable. This feature totally useless.

As you can see Excel does not provide a way to switch comfortable between more that 15 Sheets in a Workbook. So I decided to create my own solution.

Excel Sheet Switch

The Add In displays a multi-line switch bar on the bottom of the Excel application’s window, if the Workbook contains more that 5 Sheets.

Office 2010 and Office 2013 Only – Please note that the solution here works with Office 2010 and Office 2013

http://dl.dropbox.com/u/40751518/CodeSamples/Be.ExcelSheetSwitch-1.0.0.4.zip

You can use the setup.exe included in the download. Please ignore the security warning and click install – I’m using a Test Certificate there.

Technical Solution

I used Visual Studio 2010 to create a VSTO solution. It tooks me 15 minutes to write the code needed. It’s very simple, so I don’t want to go into details. If you want to know more, you can discover the code in the download above.

Questions

Is there a way to turn the AddIn off?

Yes, the only way is by disabling the COM AddIn in Excel

– Start Excel and click into File / Options / Add-Ins (Tab)

– Manage: COM Add-Ins and click Go…

You can enable the AddIn in the same way.

Are there any configuration settings for the AddIn?

ShowSheetCount (Be.ExcelSheetSwitch.dll.config). The default value is 5. The Sheet Switch AddIn will be shown if the workbook contains at least 5 sheets or more. You can change this setting by modifying the configuration file manually for example by using Notepad.

Where can I find the configuration file Be.ExcelSheetSwitch.dll.config?

– Open Windows Explorer and try to find the configuration file with the name