Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Text Macro (PPoint 2000)

    I picked this slide demo up off the internet somewhere the other day, and really would like to use it as an example in class, however, can anyone tell me the VBA expression or a Macro that I could write or record that would CLEAR the screen of showing formatted text (no boxes highlighted) when the show is run, so once the examples are given, I can click another button to clear all formatting in any text box that still may show any.
    Thanks as always,
    Nannette
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Change Text Macro (PPoint 2000)

    Very clever! I am interested to see what others will suggest.
    However, in my opinion, it might be faster to have a duplicate slide without formatting. Create a button (that says "Clear Formatting") that hyperlinks to that slide.
    You probably thought of this already.

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Change Text Macro (PPoint 2000)

    Hats off to the author, this is a clever bit of coding. So clever in fact that you don't need to write any code to do what you would like.

    Duplicate one of the bevelled boxes. Give it a clear fill. Change the text within this new bevelled box to something that is in each of the boxes above. I used a space but you could reword the above boxes so each included the word 'clear' if you wanted to be subtle.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Text Macro (PPoint 2000)

    Proper acknowledgment = http://www.mvps.org/skp/ and the author is Shyam Pillai. A must visit for many great PowerPoint add-ins. A real WOW site. <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21> Thank you for your feedback..It worked great! i had thought and tried the duplicate slide, but wasn't happy with it as I am finding the trick to CLEAR that you gave me Andrew. Hat is off, and I am bowing. I made a copy of one of the buttons, cleared the formatting, Typed the word CLEAR into it that went along with a text box I typed Clear into, ...then I removed the lines and color on that text box, and pulled it right off the screen...leaving only the clear beveled button in the bottom right corner to click on when needed. Worked fantasticly.....you all are great!!!!!!!!!!!
    Thank you truely, as always...I salute you
    Nannette M. Padgett
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  5. #5
    Silver Lounger
    Join Date
    Jan 2001
    Location
    West Long Branch, New Jersey, USA
    Posts
    1,921
    Thanks
    6
    Thanked 9 Times in 7 Posts

    Re: Change Text Macro (PPoint 2000)

    Nanette,

    I think it's even easier than what you did, if I understood your goal. I looked at Shyam's code. In the main routine that does the work, FindTextAndHighlightShape, a search is done for all the shapes on the slide. He skips over shapes that are bevel buttons. Note also that the top and bottom boxes are on the slide master, so I presume these are not even in the collection of shapes in the slide that the code goes thru.

    For the remaining shapes (the 4 wide boxes under the "Demo" box), the code checks that there's a text frame and that it actually has text. If so (certainly the case for the 4 boxes), then the code checks to see if the text from the bevel-button originally clicked and passed to FindTextAndHighlightShape is in the text frame. If so, the formatting from the bevel-button clicked is "picked up" and applied to the shape (1 of the 4 boxes). If not, the code sets the Fill to False (what going into the Format AutoShape dialog would do in the Colors and Lines tab and set Fill to "No Fill") and Transparency to 0# (whatever that is; my VBA is not that good).

    So, with all of the explanation of the above paragraph, to accomplish your goal, you could either
    - create a new bevel button with no formatting (as already suggested) and put in a word that does NOT appear in any of the 4 boxes. I used "Clear" - no need to retype the 4 boxes. This will clear the formating of a box if no match was found between the word in the new button and the box.
    - create a new bevel button with no formatting and put in a word of any of the 3 existing bevel-buttons. For example, if you make your clear bevel-button say "Microsoft", then any of the 4 boxes with "Microsoft" will match the new button and pick up the clear-formatting of the "Microsoft" clear button.

    So in one case, you clear bcs you don't find a match. In the other case, you clear bcs the match picks up the clear formatting of the button with clear formatting. When all is said and done, any of the 4 wide boxes that were colored are now cleared - one way or the other.

    Hope this helps.

    Fred

Posting Permissions

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