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.
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.
Yes, but why?
Cheers,
Paul Edstein
[Fmr MS MVP - 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.
What is your suggestion?
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.
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.
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.
Hi,
Would you give example to attached example doc?
Thank you.
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?
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.
See attached. There are no shapes...
PS: Your own document's structure is atrocious.
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.
Try:
Please Login or Register to view this content.
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.
The macro runs fine on the document you attached.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks