<

Option to open excel 2007 documents in a new instance

Published on
27,769 Points
20,269 Views
10 Endorsements
Last Modified:
Approved
Community Pick
Problems we all know excel has
Many people are tired of the way excel workbooks are affected by every other workbook you have opened. When you calculate one, they all calculate.  Excel acts as though they are inter-dependent when they really aren't.  Well with a simple registry injection, you can add a right click menu to the shell that lets you open excel in a new instance instead of just opening another excel workbook in the same window as any existing one.

Another great side effect is that you can finally view documents side by side instead of awkwardly having to un-maximize windows within the application and arrange them. Having multiple excel instances in infinitely useful. If one workbook crashes, the rest will remain intact! This is the perfect solution for workplaces that thrive off a variety of excel applications and frequently experience mass crashes and restores.

The following solution is adapted from a general solution involving editing the advanced properties under explorer folder options for file types. I went directly to the source and created registry editing files that would add the new context menu, and even make it the default behaviour if desired.

The end result:
Excel files with the new menu item.
Instructions
If this is something you want, then copy the attached code into a .reg file, or download the registry editing files. Note that there are 4 variations - one adds the new menu option and makes it default, one just adds the menu option, but leaves "Open" as the default. The last file is used to remove the changes from the registry and put everything back how it was before.

Note that you can use the files in any order. If you add the menu option, then decide later you want it to be the default behaviour, you can run the first file after the second one. Similarly, if you want to undo making it the default behaviour, you can run the "Remove changes" file and then run the second file to add the menu item back without the default.

What to expect
A quick tip - if you are having problems copy pasting, remember that excel advanced formatting only copy pastes between separate workbooks if they are in the same instance (probably why Microsoft made same-instance opening the default behaviour.) If you need to copy paste between two workbooks, then you should be opening them in the same instance, so select the normal 'open' for these, otherwise, you should be happy with separate instances.

Another note is that separate instances of excel consume more memory. If you have enough workbooks open that this affects you, though, then you'd probably be experiencing issues in a single application instance anyways.

Download
Here's the required registry files: Open-In-New-Excel-Instance.zip

The code contains the same three entries for each format associated with Excel. If you understand what I'm doing here, you should have no problem adding or removing formats based on whether you have another version of excel, or different formats that you want behaving this way.
Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\Excel.Backup\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Backup\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Backup\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.OpenDocumentSpreadsheet.12\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.OpenDocumentSpreadsheet.12\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.OpenDocumentSpreadsheet.12\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.Sheet.12\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.SheetBinaryMacroEnabled.12\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.SheetBinaryMacroEnabled.12\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.SheetBinaryMacroEnabled.12\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.SheetMacroEnabled.12\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.SheetMacroEnabled.12\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.SheetMacroEnabled.12\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.Template\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Template\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Template\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.Template.8\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Template.8\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Template.8\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.TemplateMacroEnabled\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.TemplateMacroEnabled\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.TemplateMacroEnabled\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\"" 

[HKEY_CLASSES_ROOT\Excel.Workspace\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.Workspace\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.Workspace\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\""

Open in new window

10
Comment
Author:alainbryden
8 Comments
 
LVL 21

Author Comment

by:alainbryden
A lot of people have been mentioning the fact that they also want CSV files to have this option.

I originally left it out because I thought people might have other software they prefer to open CSV files in (like notepad), but if you want these opening in a new instance of excel as well, just add the code below to your script before running it.

Cheers.

[HKEY_CLASSES_ROOT\Excel.CSV\shell]
@="Open_in_New_Excel_Instance" 
[HKEY_CLASSES_ROOT\Excel.CSV\shell\Open_in_New_Excel_Instance]
@="Open in New Excel Instance" 
[HKEY_CLASSES_ROOT\Excel.CSV\shell\Open_in_New_Excel_Instance\command]
@="\"C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" \"%1\""

Open in new window

0
 
LVL 58

Expert Comment

by:tigermatt
Alain,

A very nice tip/trick I wish I came across earlier. This frustrates me no end when working with Excel.

"Yes" vote above.

Thanks for your work,

-Matt
0
 

Expert Comment

by:foodstuffs
An easier option is add the Excel shortcut to the 'SendTo' folder with the "/b" switch.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 

Expert Comment

by:sunstonecircuits
This works for Excel 2007 in Win7.  I have Excel 2010 in Win7.  It does not work
0
 
LVL 21

Author Comment

by:alainbryden
Yes, this was only designed to work with Excel 2007. As stated, you should have no problem adding or removing formats based on whether you have another version of excel. Note that all the registry entries refer to the program run path as "C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE\" This is, of course, completely different for 2010. To adapt the registry entries you will have to locate your excel 2010 runtime in the program files folder.

In the zip file, there exists a registry file that will undo the changes made by this script.

Alain
0
 
LVL 21

Author Comment

by:alainbryden
I've created .reg files for Excel 2010, as well as a batch file solution that does not require modifying the registry. Download and details are available at https://github.com/alainbryden/Open-Excel-In-New-Instance
0
 

Expert Comment

by:CKirby18
What about an option to open in a new instance if the Shift key is being held down?
0
 
LVL 21

Author Comment

by:alainbryden
In windows, shift+double-click is a reserved action that opens all selected folders. If you shift+double-click on a file no action is taken, and I can't imagine there's any way to do this without some sort of always-running tray program monitoring key strokes. Maybe you could set something like that up with autohotkey.
0

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Join & Write a Comment

This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
A query can call a function, and a function can call Excel, even though we are in Access. This is Part 2, and steps you through the VBA that "wraps" Excel functionality so we can use its worksheet functions in Access. The declaration statement de…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month