#1
|
|||
|
|||
Adding addresses and $ amounts to Word docs
I'm new to MS Word VBA programming -- question is for MS Word 2010 I am trying to create a Macro that opens 6 MS Word docs. I need to be able to copy and paste addresses (that may not be formatted correctly) from another document into various combinations of these 6 MS Word Documents. Also, some of the documents, I need to be able to change dollar amounts in portions of the document. In the main document, which needs to be sent to everybody, I created a form, which includes a text box. I want to copy the address into the text box, and when the user has the address formatted correctly, to paste it into the address area of the various Word Documents (which will be selected by through radio buttons). Also, the user will fill in various text boxes with dollar amounts, and I want these to be pasted into the correct spots in the documents. What's the best way to do the "paste" operations? Create fields in the document, and paste into these fields, or is there a better way. I don't know how to paste into a field with VBA. Most of the mechanics of the other things I want to do with this macro, I have figured out. I am not a professional, but I learn by doing things. TIA |
#2
|
||||
|
||||
I'd suggest re-formatting the addresses correctly in your userform, then using a button to populate a bookmark in each document with the correctly-formatted address. As for changing amounts, you can use the same approach - bookmark where they are to go and have fields in your userform for inputting the required amounts, then using a button to populate a bookmark in each document with the correctly-formatted values. For code to update bookmarks, see: https://www.msofficeforums.com/word-...html#post67058
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank-you for your reply. I will try what you suggest.
What I envision is maybe a frame for each form, containing a radio button and text boxes for currency input, as required, for each Word document (letters). At the bottom of the form is a Print button. The user will depress the print button, which will input the address and populate other fields, as required, for the forms which have been selected by the radio buttons, and print all the selected forms. BTW, I am retired (twice), and am doing this for my daughter, who is the Director of Financial Aid for a very, very small college. The IT group doesn't seem to have time to automate stuff. I am using this as a learning opportunity on my part (and it is enjoyable too). I have already done some Excel macros for her, that do some pretty neat stuff, that save her a lot of time, and increase her accuracy. Thanks again -- |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tracking Amounts | teza2k06 | Excel | 1 | 04-13-2014 09:28 PM |
Batch adding Metadata to Docs | AndyTake2 | Word | 0 | 02-01-2013 10:18 AM |
Vlookup help for large amounts of stock data | jyfuller | Excel | 15 | 09-21-2012 11:35 AM |
indent alternate lines by different amounts | rufusfrog | Word VBA | 5 | 02-25-2012 03:36 AM |
Adding identical footers to 187 separate docs | sqzdog | Word | 11 | 10-31-2011 01:46 AM |