Pages: 1
Print
Author Topic: Disabling Change Tracking Toolbar Controls  (Read 4228 times)
gihyunlee
Member

Posts: 11


WWW
« on: December 08, 2008, 03:00:29 PM »

Is there an easy way to disable the change tracking controls ('Track Changes' and 'Accept or Reject Changes...') from a XMetaL document customization?

From my understanding of the documentation, I cannot set

CommandBarControl_object.Enabled = false

if the control is a built in control.  Please let let me know if there is a way to do this.  The current way I am doing this is to remove the two items from the menu bar altogether.
Logged

Gi H. Lee
Consultant & Software Engineer @ Flatirons Solutions & Zia Consulting
mag3737
XMetaL Evangelist
Administrator
Member

Posts: 100


I even use XMetaL to write my business letters.


« Reply #1 on: December 09, 2008, 04:44:35 PM »

Removing the items the only way I know how to do it.  I'll invite Derek to chime in if he knows something different.

I assume your purpose is that you want Change Tracking operations to be on/off at your own control, not at the user's.  Are you also remembering to disable the "Reviewing" toolbar which provides access to the same (and more) operations?
Logged

Tom Magliery
JustSystems Canada, Inc.
gihyunlee
Member

Posts: 11


WWW
« Reply #2 on: December 09, 2008, 09:23:03 PM »

Removing the items the only way I know how to do it.  I'll invite Derek to chime in if he knows something different.

I assume your purpose is that you want Change Tracking operations to be on/off at your own control, not at the user's.  Are you also remembering to disable the "Reviewing" toolbar which provides access to the same (and more) operations?

Yes, the purpose of disabling the track changes operations is to be able to control them.  I dont want to completely remove them because I could not figure out how to re-add them back if they are needed later on.  If it is just as easy to re-add the change tracking controls, please let me know.

And thank you, I did forget about the Reviewing toolbar.
Logged

Gi H. Lee
Consultant & Software Engineer @ Flatirons Solutions & Zia Consulting
XMetaLOldTimer
Global Moderator
Member

Posts: 19


« Reply #3 on: December 11, 2008, 01:21:07 AM »


If your requirement is to stop change-tracking for custom operations/macros, you can toggle off the 'TrackRevisions' property on ActiveDocument and restore it when the macro/script completes.

Regards,
Addam

P.S. CommandBarControl.Enabled still remains unimplemented for both built-in or custom toolbar controls.  You can only disable custom controls via Application.DisableMacro(macroName).

Logged

Addam Smith, XMetaL Project Lead & Architect
JustSystems Canada Inc.
gihyunlee
Member

Posts: 11


WWW
« Reply #4 on: December 11, 2008, 01:56:48 AM »

Thanks for the input.  So, I figured out how to reset the tool bars, much easier than I thought.

So if one cannot disable a built in CommandBarControl, is it possible to disable the "Reviewing" toolbar as mag3737 stated?

I've tried executing the following code snipped from various macros and it will not disable the Reviewing toolbar.

Code:
var cmdBars = Application.CommandBars;
var revBar = cmdBars.item("Reviewing");
revBar.Enable = false;

This does not disable the reviewing toolbar.  I've also tried to individually disable each control within the Reviewing toolbar and had no better success.  But XMetaLOldTimer's note explains why this doesnt work.

Any suggestions?  Is it possible to completely disable the Reviewing toolbar?

Just as a little background I am doing this in a document customization and not an application customization.


Logged

Gi H. Lee
Consultant & Software Engineer @ Flatirons Solutions & Zia Consulting
gihyunlee
Member

Posts: 11


WWW
« Reply #5 on: December 11, 2008, 12:24:25 PM »

I just realized I can do the same thing for the Reviewing command bar controls and just remove all the icons.
Logged

Gi H. Lee
Consultant & Software Engineer @ Flatirons Solutions & Zia Consulting
Pages: 1
Print
Jump to: