Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cycling command bar controls in PowerPoint (Office 2003)

    Afternoon

    Can anyone help ... please !! I am cycling through the controls (using VBA) in the "Formatting" menu bar, identifying the"Layout" control and actioning "Execute". The problem I am encountering is that the "Layout" control is held within the "Add and Remove Buttons" section of the menu bar. If "Layout" is not selected to appear on the toolbar I am unable to pick up the control and execute, but if I place the control on the menu bar I can action the control.

    Is it possible to get access to the control when it has not been added to the menu bar (through VBA)? I have looked at the "Enabled = False" option under the control but it does not appear to recognise the "Layout" control.

    Any help would be greatly appreciated.

    Regards
    Jack

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cycling command bar controls in PowerPoint (Office 2003)

    If you put Layout on a toolbar temporarily, you can use VBA to find out that the ID for this control is 700:

    Debug.Print CommandBars.FindControl("Layout").ID

    You can then remove it from the Formatting toolbar, and still refer to it through its ID:

    CommandBars.FindControl(ID:=700).Execute

  3. #3
    Star Lounger
    Join Date
    Jun 2004
    Location
    Gtr London, England
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cycling command bar controls in PowerPoint (Office 2003)

    Hans

    You're an absolute star - I've been looking at this for ages, trying to cycle through the controls (nightmare).

    Many thanks
    Jack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •