Results 1 to 9 of 9

Thread: [RESOLVED] Powerpoint

  1. #1

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Resolved [RESOLVED] Powerpoint

    Hopefully an easy question - although I haven't found much online that makes sense.

    I need in VBA to create objects (done that bit) and then group them together.

    I don't see an easy way of selecting/using shapes I've generated in code and grouping them.

    Does anyone have a bit of code they can explain how it selects the shapes?


    MS help seems to use strings of shapes... but I'm generating a lot (1000+ shapes) that I want to group... would it be easier to generate them first then group? Or group as I make them?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: Powerpoint

    i never used powerpoint vba, i just recorded a macro, something like this
    Code:
    ActiveWindow.Selection.SlideRange.Shapes.SelectAll
    ActiveWindow.Selection.ShapeRange.Group.Select
    u can also record macro and try something then play with that, it wil be helpful.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  3. #3
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Powerpoint

    The simplest would be to group them in the end if they can be grouped.

    Code:
        ActivePresentation.Slides(1).Shapes.SelectAll
        ActiveWindow.Selection.ShapeRange.Group
    Edit: Beaten by Seenu
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  4. #4

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Powerpoint

    So only using the selection object ?


    Ok, well at least its given me something to try

    (problem was there are other shapes in the background behind those I'm creating... just to be complicated!)

    Thanks for the responses people!

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Powerpoint

    Hi


    Another two questions:

    1) how do I record a macro in powerpoint (no option like there was in excel..?)

    2) For text boxes, how do I change font size as I create them?

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  6. #6
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: Powerpoint

    1. Tools > Macro > Record new macro...
    2. Textbox using Insert > TextBox - same as normal formating method, if it is from Control ToolBox then Right click > Properties > Font ...
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  7. #7

    Thread Starter
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Powerpoint

    Hi,

    I'm using 2010... no menu... Thanks tho!

    Found the font under texteffects (ummm yeah thats logical! - not :/ )

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  8. #8
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: [RESOLVED] Powerpoint

    i never used 2010... i think macro in developer menu tab.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  9. #9
    Addicted Member
    Join Date
    Jan 2009
    Posts
    183

    Re: [RESOLVED] Powerpoint

    I know that macro recording is not available in PPT 2007, I'm pretty sure that's the case for 2010 as well.

Posting Permissions

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



Click Here to Expand Forum to Full Width