Page 1 of 1

Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 5:59 pm
by PeteK
I have an older MS Excel application with a custom menu bar, which I'm trying to update for Excel 2010 with a custom ribbon.

In the application, I wish to remove all of the standard controls, and in particular those that allow saving the file after changes have been made
(the file creates output as separate files via macros, and the original is not to be overwritten).

With XML, I have been able to modify the ribbon UI to hide all tabs except (my) add-in and the backstage (file) tab.
I also have cleared everything from the QAT and the backstage, but some items from the PDF XChange 2012 add-in still appear:
- a SaveAs menu (the default is save as PDF, but the option to save as XLSM with the original file name is there)
- a Send (create PDF and email) option

Can you provide the mso IDs for these controls, so that I can explicitly remove them for this workbook application?
The XML syntax might be something like <backstage> <tab idMso="TabAddIns" visible="false"/> </backstage>
(but that isn't working)

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 6:55 pm
by Will - Tracker Supp
Hi Pete,

Thanks for the post - Is it the Reg. ID's that you're looking for?

Cheers,

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 7:20 pm
by PeteK
Will,

I don't think so. The complete XML code is included below. It turns off everything except some controls that seem to come from the PDF XChange add-in.

All the built-in MSO controls for Office 2010 ribbon are collected here: http://www.microsoft.com/en-us/download ... px?id=6627
I think PDF XChange add-in creates some custom ones, which I can't make invisible unless I know their names.

I can attach a screenshot showing the control images if that would help.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<qat> <sharedControls>
<button idMso="FileNewDefault" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileSave" visible="false"/>
<button idMso="FileSendAsAttachment" visible="false"/>
<button idMso="FilePrintQuick" visible="false"/>
<button idMso="FilePrintPreview" visible="false"/>
<button idMso="Spelling" visible="false"/>
<button idMso="Undo" visible="false"/>
<button idMso="Redo" visible="false"/>
<button idMso="SortAscendingExcel" visible="false"/>
<button idMso="SortDescendingExcel" visible="false"/>
<button idMso="AddInManager" visible="false"/>
</sharedControls> </qat>
<tabs>
<tab idMso="TabHome" visible="false"/>
<tab idMso="TabInsert" visible="false"/>
<tab idMso="TabPageLayoutExcel" visible="false"/>
<tab idMso="TabFormulas" visible="false"/>
<tab idMso="TabData" visible="false"/>
<tab idMso="TabReview" visible="false"/>
<tab idMso="TabView" visible="false"/>
<tab idMso="TabDeveloper" visible="false"/>
<tab idMso="TabAddIns" visible="true"/>
<tab idMso="TabPrintPreview" visible="false" />
</tabs>
</ribbon>
<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="FileSaveAs" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileClose" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
<tab idMso="TabInfo" visible="false"/>
<tab idMso="TabRecent" visible="false"/>
<tab idMso="TabNew" visible="false"/>
<tab idMso="TabPrint" visible="false"/>
<tab idMso="TabShare" visible="false"/>
<tab idMso="TabHelp" visible="false"/>
</backstage>
</customUI>

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 7:27 pm
by PeteK
Screenshot attached

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 7:47 pm
by PeteK
It doesn't appear that the file upload is working. You may be able to see the screenshot here:

https://drive.google.com/file/d/0B1ERpf ... sp=sharing

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 9:22 pm
by Ivan - Tracker Software
These two controls have the following IDs: PXC5_SaveAsPDF and PXC5_SendByEmail.
By the way, we cannot guarantee that in the a future new control would not be added, or existing controls would not be changed/removed.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 21, 2014 9:33 pm
by PeteK
Ivan,

Thanks. Could you also please tell me the control types for PXC5_SaveAsPDF and PXC5_SendByEmail?

I'm presuming I can just make each of them invisible with a line of XML inside the backstage element of the ribbon UI.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Tue Nov 25, 2014 3:03 pm
by PeteK
Ivan,

I'm still having difficulty figuring out how to disable the controls for this specific workbook. I can't seem to find the procedure or syntax for this anywhere.

Can they be disabled using ribbon xml commands for the backstage (file) tab? Or is some other method required?

As I've set StartFromScratch to true for the ribbon, I'm beginning to think the add-in control visibility is application-dependent and may not be adjustable for specific workbooks.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Tue Nov 25, 2014 8:59 pm
by Ivan - Tracker Software
Here is a part of our custom UI we provide to the office app:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="...">
	<ribbon>
		<officeMenu>
			<splitButton idMso="FileSaveAsMenu">
				<menu idMso="SplitButtonMenu">
					<button id="PXC5_SaveAsPDF"
							insertAfterMso="SaveObjectAs"
							/>
				</menu>
			</splitButton>
			<menu idMso ="FileSendMenu">
				<button id="PXC5_SendByEmail"
						insertAfterMso="FileSendAsAttachment"
					/>
			</menu>
		</officeMenu>
		...
	</ribbon>
</customUI>
HTH

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Wed Nov 26, 2014 3:04 pm
by PeteK
Thanks Ivan. I will see what I can do with that syntax.

It may be a little tricky as I'm running office 2010 and some of the syntax (officemenu/backstage) has changed from 2007.
(the custom UI code you sent appears to be for office 2007).

If you have a slightly different bit of code for 2010 installations, that might save me some guesswork.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Wed Nov 26, 2014 4:52 pm
by PeteK
I've figured out what I need to do for Office 2007, but I'm still stumped for 2010.

<splitButton idMso="FileSaveAsMenu"> and <menu idMso ="FileSendMenu">

are listed as "Not in the Ribbon" in 2010, and adding XML about them inside the backstage element, the ribbon element or the customUI generates an "invalid child element" error.

I'm thinking you must have created a custom element inside backstage where these are placed.
It looks like a dropdown named "Add-Ins", but the UI editor tells me that child elements there can only be buttons or tabs.
Perhaps there is some sort of special button definition syntax that lets you have a dropdown button there?

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Wed Nov 26, 2014 7:46 pm
by Ivan - Tracker Software
No, the same XML are used for all offices with Ribbon (2007, 2010, 2013).
I suppose, "Add-Ins" item are added by the Office app when 2007s items are used.
We can change a code a bit to have different XMLs for different Office's versions.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Nov 28, 2014 11:23 pm
by PeteK
Hmm...

I will try deleting the customUI XML for office 2010 and see if it will pick up the changes correctly from the 2007 file.

I do know that I can not put that same syntax in the 2010 customUI XML - it is not valid for that namespace (officemenu is not a child element of the ribbon in 2010).

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Mon Dec 01, 2014 6:46 pm
by Tracker Supp-Stefan
Hello Petek,

I had another word with Ivan, and he just repeated the above that he will provide different XMLs for the different Office versions, and this should solve your problem.

Regards,
Stefan

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Mon Dec 29, 2014 5:05 pm
by PeteK
Tracker Supp-Stefan wrote:Hello Pete,

I had another word with Ivan, and he just repeated the above that he will provide different XMLs for the different Office versions, and this should solve your problem.

Regards,
Stefan
Great. I had put the project aside as I had gotten frustrated trying to find a solution on my own.

But since then there have been additional requests to update the program, and it is becoming more urgent as the new year approaches.

It is clear in Office 2007 how to "undo" the XML above that adds the controls to the ribbon, but the syntax that works for that does not work in Office 2010.
Furthermore, we will soon be migrating to Office 2013. I am not sure if that will require yet another XML or if the syntax will be essentially the same as 2010.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Mon Dec 29, 2014 5:53 pm
by Will - Tracker Supp
Hi Pete,

I'm afraid that we're currently on a rotating 'Skeleton' schedule for Christmas, so the best that I can do for now, is pass this along to Ivan for when he's in next.

Cheers,

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Tue Jan 06, 2015 2:12 pm
by PeteK
Ivan, do you have any update or estimated time of completion?

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Tue Jan 06, 2015 5:49 pm
by Ivan - Tracker Software
New build should be available in few weeks time.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Jul 10, 2015 7:26 pm
by PeteK
Is the custom UI build for office 2010 available yet? In January Ivan mentioned that this might be ready in a few weeks.

If you have the code for this, please send me a copy so that I can disable it when running my application which uses a custom ribbon.

Thanks!

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Fri Jul 10, 2015 8:45 pm
by Ivan - Tracker Software
As I mentioned in January, now the Office addin provides different XMLs for Office 2007 and Office 2010/2013.
In the version fro Office 2010/2013 there are no buttons PXC5_SaveAsPDF and PXC5_SendByEmail.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Mon Jul 13, 2015 4:27 am
by PeteK
Thank you. How do we load the updated add-in on our machines? I presume there is no auto-update, so we'll have to find and reinstall something.

I think until we deploy the new add-in business-wide we will still have machines that display the buttons I would like to remove.

Re: Need Office 2010 control IDs for PDF XChange add-in

Posted: Mon Jul 13, 2015 1:58 pm
by Tracker Supp-Stefan
Hello PeteK,

You can always find the latest builds of all our products here:
https://www.tracker-software.com/product/downloads
And yes - you will need to update to get those buttons sorted.

Regards,
Stefan