georgeberz Posted December 12, 2006 Report Share Posted December 12, 2006 I have a spreadsheet that has name address and phone number information I wanted to be able to have excel closed and run a macro that would access that file and pull a row or column out to paste into the text file I am working on, ie different name and addresses depending on who I am writing a letter for ie hit f1 and it pulle data from address.xls column 1 row 1,2,3,4,5 and pastes it in the text file I am currently working on... Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted December 17, 2006 Report Share Posted December 17, 2006 I do this exact thing in many of my macros. You can have your macro open the excel file go to the line desired by doing a find or by just going line by line. You can then have the macro copy cell, assign to a variable, arrow right, copy next cell, assign to a variable, arrow right, etc. etc. You can then have the macro close the excel file, open or activate your Word or other document and then copy the data into the correct spot by using the variables. I have a macro that takes information line by line off of an excel spreadsheet withover 13000 lines of information and put's it into letters and ten processes that information in our company's billing system. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.