Home |
Search |
Today's Posts |
#3
![]() |
|||
|
|||
![]()
Hi
I have done as you suggested and made templates of the originals and started to write the macro's - if anything doesn't fall in to place will come back with the questions. Thanks again Mully "Charles Kenyon" wrote: First, do not "open" the templates. Create new documents based on them. This is done with the Documents.Add command. Second, you can do this within your Excel UserForm so long as you specify the application (Word) and it is available. I'm not about to write your code for you without being paid (and you can find better and cheaper programmers). However, take a look at http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm, http://word.mvps.org/FAQs/MacrosVBA/...csIn15Mins.htm and http://word.mvps.org/FAQs/MacrosVBA/...csIn15Mins.htm. What I would do if I were attempting to write your code would probably be to start by recording a macro for each of your templates that (1) creates a new document based on the template, (2) performs a merge with your data and possibly (3) prints your new merged document. Save the macros and use them as a starting point. That would at least give the appropriate collections and commands although it would probably have a lot of excess code. I would then work on cleaning out the excess and modifying the code so it would work in your Excel form. http://word.mvps.org/FAQs/MacrosVBA/...ordedMacro.htm http://word.mvps.org/FAQs/InterDev/C...WordFromXL.htm Hope this helps get you started. Once you have actual code if you run into problems, post back in the word.vba.beginners or word.vba.userforms newsgroups. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://www.mvps.org/word which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "mully" wrote in message ... Hi All In MailMerge I have used details from an Excel Sheet which has several columns with Name/ Address/ Contact Info etc. I have created the MailMerge into 3 templates i.e. Labels / Letter / Permit. If I create a user form with 3 Command Buttons named respectively Labels / Letter / Permit and on clicking the respective buttons it will open the template ready for use e.g. click on Labels and the whole shebang opens ready to print the 250 or so Labels. What code would I need to put in the VBA Modules. To take it a stage further we have a User Form in Excel is it possible to put 3 extra buttons on the Excel User Form and go straight into MailMerge as above. Any help much appreciated Cheers ------ Mully |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MULTIPLE INSTANCES OF THE SAME BOOKMARK IN A USER FORM | Microsoft Word Help | |||
How do I allow a form user to insert pictures into a document | Microsoft Word Help | |||
allowing a user to attach a file to a form | Microsoft Word Help | |||
Adding Autotext in a Macro User Form field | Microsoft Word Help | |||
allow user to add text to an already existing form list field | Microsoft Word Help |