|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Name a Range in a Word Document and then copy that range to the end of the doc w button click
Forgive me for being a NEWBIE, but I could really use some help. I am quite proficient with Excel VBA, but doing anything with VBA in Word is totally new to me. I have a document my admin wants to use as a template. There are two sections of the document (Key Highlights and Comprehensive) that she would like to create copies of any time a user clicks on the "add Key Highlight" or "add Comprehensive" buttons. The two sections are identical. They each contain 5 lines. The first two lines (shown as Choose an Item) are drop-down lists that the user will choose from. and then the remaining 3 lines are just text.
As easy as it is to just select the range and do <ctl>C and <ctl>V, she would like to achieve the same result by clicking on a button, and having the code insert the new copy of the five lines at the end of whichever section the user is in. If I Add a Highlight, add it to the bottom of the highlight section, just before the Comprehensive section starts. If I add a comprehensive, add it to the bottom of the Comprehensive section, just before Documentation. Is this making any sense at all? If anyone could help, I'd be happy to send you the document so you can see what I'm describing. I could REALLY use some help on this one. |
#2
|
||||
|
||||
You could create some custom building blocks that could be inserted on demand, via Insert|QuickParts. No code required. See:
https://support.office.com/en-us/art...C-98599F16CADC http://gregmaxey.com/word_tip_pages/...galleries.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Import range between two string from other document | PRA007 | Word VBA | 1 | 12-18-2015 09:23 PM |
Set Excel Range using Word | gbrew584 | Word VBA | 3 | 12-07-2015 01:51 PM |
VBA macro to copy range and paste in next blank row | tune2grow | Excel Programming | 0 | 09-03-2014 08:25 PM |
copy a range including shapes | Marcus | Excel Programming | 8 | 08-17-2012 01:50 AM |
Loop through folder of workbooks and copy range to other workbook | Snvlsfoal | Excel Programming | 3 | 07-29-2011 05:55 AM |