+ Reply to Thread
Results 1 to 16 of 16

Group shapes and text boxes on each page in Word

  1. #1
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Group shapes and text boxes on each page in Word

    Hi,


    I have Word document contain many shapes and text box in multiple pages on Word document.

    Is it possible to use VBA to group shapes and text boxes on single page and loop the process through other pages?

    Appreciate for any help.

    Thank you.

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    Yes, but why?
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Group shapes and text boxes on each page in Word

    I have hundred of pages in word document.
    Each page have shapes and text boxes which currently ungrouped.

    What i am doing now is group shapes and text boxes in each page.
    Once grouped, copy that single shape into new document.
    Doing that manually each pages ia very time consuming.

    Also the reason i want to grouped them in each pages to make the content more stable.

    Try to find on google,

    Found code: activedocument.shapes.selectall

    But this one select all shapes on all pages and cant be grouped.

    Hope my explanation clear.

    Thank you for reply my thread.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    Quote Originally Posted by qiyusi View Post
    I have hundred of pages in word document.
    Each page have shapes and text boxes which currently ungrouped.
    Sounds like an exceptionally bad design to me... Simply grouping all these objects on each page is of itself liable to mess up your document's layout.

  5. #5
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177
    What is your suggestion?

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    Let me ask you some questions:
    1. Why do you have hundreds of pages with shapes and text boxes on them?
    2. What else is on those pages?
    A document such as you've described is typically what one might get from a poor-quality PDF to Document converter; a decent one wouldn't generate such an output.

  7. #7
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177
    Hi,

    In one section, the document contain 3 pages with each page has different shapes as a header.

    1. Objective
    2. Instruction
    3. Notes

    I keep them as shapes, as if i set them as header then i have to set page break next page to have different header to each page which more time consuming.

    The content also contain shapes as different colored bullet.

    So i am thinking to group the content with the header. To avoid incidentally moved one of the shape.

    I know its bad format, but i will be appreciate if you may help me to create the code as my earlier message to group the shape on a single page. And repeat the process until the end of the document.

    Thank you.

  8. #8
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    You can have different headers without having Next Page Section breaks. Furthermore, even without doing that, your Objective, Instruction & Notes could all be put in a table with text-wrapping instead of in independent textboxes; that way they would automatically be grouped without the need for any code.

  9. #9
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Group shapes and text boxes on each page in Word

    Hi,

    Would you give example to attached example doc?



    Thank you.
    Attached Files Attached Files

  10. #10
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    Your attachment has only 3 pages. What is supposed to happen after the 3rd page? Do all the headings simply repeat? Furthermore, why is all the other content in textboxes?

  11. #11
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177
    Yes, the header simply repeat but wih different content.

    The text in text box so they can grouped with the bulleted shapes.

    So i dont think i cant use table as your suggestion.

    Also note that i will copy the grouped shape into new document that has different papersize.
    So i can flexible resize the grouped shape.

    Back to my previous post.
    The code: activedocument.shapes.selectall
    May help me a lot if it can apply to current page and not whole pages.

  12. #12
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    See attached. There are no shapes...

    PS: Your own document's structure is atrocious.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Group shapes and text boxes on each page in Word

    Hi,

    Yes, i know current document structure is horrible :D
    Your example, i perhaps can apply your example on future work.
    but for now, if i have to copy paste the text box content into the table, then will be more work to do rather than just group the shape.
    Thank you anyway for trying. i still hope that you have idea about vba code to group shapes on current/active page. that's all i need at the moment.

  14. #14
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    Try:
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    10-22-2014
    Location
    Indonesia
    MS-Off Ver
    2010
    Posts
    177

    Re: Group shapes and text boxes on each page in Word

    Hi,

    Thank you for the code.
    i tried the code to example doc, but give error as attached.
    is it running well on your computer?

    Thank you.
    Attached Images Attached Images

  16. #16
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Group shapes and text boxes on each page in Word

    The macro runs fine on the document you attached.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. excel 2013 customize context shapes and shapes group menu right click
    By Giuseppe77 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2016, 11:50 AM
  2. excel 2013 customize context shapes and shapes group menu right click
    By Giuseppe77 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-03-2016, 11:50 AM
  3. Position shapes text boxes per listing on sheet to another sheet
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2014, 05:40 PM
  4. [SOLVED] Change color of text for a group of shapes
    By emiliekatherine in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2012, 08:43 AM
  5. Macro to select all shapes (text boxes) in workbook
    By Humahuaca in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 03-28-2012, 04:21 AM
  6. Macro to select all shapes (text boxes) in workbook
    By Humahuaca in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-21-2012, 12:27 PM
  7. [SOLVED] Editing color/msoGradiant of shapes, option button and text boxes
    By MD in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2006, 01:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1