1
I wanted to add Macro-enabled workbook to the New context menu in Windows.
I've seen How can I add an item to the 'new' context menu?. But merely adding the following doesn't work:
HKEY_CLASSES_ROOT\.xlsm\Excel.SheetMacroEnabled.12\ShellNew
"NullFile"=""
Nor does using a string value of "FileName"="xlsm.xlsm"
instead of "NullFile"=""
.
It gives the usual invalid extension error:
Excel cannot open the file 'filename.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
Using anything other value data for FileName
than xlsm.xlsm
(such as blah.xlsm
or excel_macro_enabled.xlsm
) doesn't create a new context menu entry at all.
I looked at the ShellNew
key inside .xlsx
, to see what the string value for new excel workbook was, and I tried creating a similar string value:
"FileName"="excel12.xlsx"
That gave me the same invalid extension error.
So, how do I create a new context menu entry for macro-enabled workbook by editing the registry?
Note:
The Excel.SheetMacroEnabled.12
key was already present inside .xlsm
key.