Adding an Action to the File Menu
To add an action to the File menu, copy one of the existing button nodes in the preceding section and add it where desired. For example, copy the button node for iManage.BSWorkSiteSaveAsVersion and add it at the end of the list (but before the final separator). The resulting section is as follows:
<backstage onHide=
"OnBackStageHide"
onShow=
"OnBackStageShow"
>
<button id=
"iManage.BSSep1"
label=
"___________________"
enabled=
"false"
insertBeforeMso=
"FileSave"
/>
<button id=
"iManage.BSWorkSiteOpen"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"openWS32"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"K"
/>
<button id=
"iManage.BSWorkSiteSave"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"WSSaveAs32"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"B"
/>
<button id=
"iManage.BSWorkSiteSaveAsVersion"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"SaveAs_New_Version"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
<button id=
"iManage.BSWorkSiteSaveAsVersion"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"SaveAs_New_Version"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
<button id=
"iManage.BSSep2"
label=
"___________________"
enabled=
"false"
insertBeforeMso=
"FileSave"
/>
To identify the new action that you want to display on the File menu, change the button id of the new node. The default XML file contains all possible actions that can be added to the File menu. To add the Save & Sync action on the File menu, for example, search in the XML file and identify the action name for Save & Sync. This action appears on the iManage ribbon by default in Microsoft Word, and appears in the file as:
<button idQ=
"im:iManage.WorkSiteSavenSync"
getLabel=
"GetWControlLabel"
getSupertip=
"GetWControlSupertip"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
onAction=
"OnWorkSiteAction"
image=
"Save_and_Sync"
size =
"large"
keytip=
"SS"
/>
From the preceding section, copy of the idQ property of the button, which is im:iManage.WorkSiteSavenSync and make that the id of the button node that you added in the File menu section. The resulting node in the list of buttons to add to the File menu looks as follows:
<button id=
"im:iManage.WorkSiteSavenSync"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"Save_and_Sync"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
Two further changes must be made to the id value:
Remove the im: prefix.
Add a number to the end of the id value to make it a unique id value in the XML file. In this case, add a 2 at the end, to arrive at:
<button id=
"iManage.WorkSiteSavenSync2"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"Save_and_Sync"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
The reason for adding 2 at the end of the button id is that button ids in the XML file cannot be repeated, otherwise when Microsoft Office tries to parse the contents of the file, the parsing will fail.
The final File menu section of the XML file looks as follows:
<backstage onHide=
"OnBackStageHide"
onShow=
"OnBackStageShow"
>
<button id=
"iManage.BSSep1"
label=
"___________________"
enabled=
"false"
insertBeforeMso=
"FileSave"
/>
<button id=
"iManage.BSWorkSiteOpen"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"openWS32"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"K"
/>
<button id=
"iManage.BSWorkSiteSave"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"WSSaveAs32"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"B"
/>
<button id=
"iManage.BSWorkSiteSaveAsVersion"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"SaveAs_New_Version"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
<button id=
"iManage.WorkSiteSavenSync2"
insertBeforeMso=
"FileSave"
getLabel =
"GetWControlLabel"
image=
"Save_and_Sync"
getEnabled =
"GetWControlEnabled"
getVisible =
"GetWControlVisible"
isDefinitive=
"true"
onAction=
"OnWorkSiteAction"
keytip=
"S2"
/>
<button id=
"iManage.BSSep2"
label=
"___________________"
enabled=
"false"
insertBeforeMso=
"FileSave"
/>