![]() |
Exporting Excel Data As Unformatted Text
Hello;
I'll try to simplify what I'm trying to do without getting into too much details that might be considered irrelevant to my question. 1. A set of VBA procedures are run successfully, and the results are compiled on a single w/s "mySheet" in a single w/b "myBook". 2. I intend to repeat 1. above 1,000s of times (same w/b, same w/s). 3. Consider a single run. The results of interest on "mySheet" are confined to a range, say, A20:K40, named "myInpRange", with a 7-digit run identifier ID automatically generated and stored in cell F5, say, F5 = 1234567 4. I've successfuly performed the following tasks manually: ....a) copy range A20:K40 of "mySheet" ....b) Open a new MS Word document ....c) Paste Special as Unformatted Text ....d) Save the Word file for this run As: LL_1234567.inp (="LL_" & F5 & ".inp") ....e) Close the Word file. ....f) Repeat a) to e) above for the next run. Q: How to code a VBA Excel macro to handle Excel & Word, and run from a button on the w/s "mySheet" to perform the tasks a) to e) above ?? In case you might wonder why I do have to go through this trouble. Well, my next set of programs are DOS-Applications, which only allow their redirected input data files to be as described above. Your help would be greatly appreciated. Have a pleasant w/e. |
Exporting Excel Data As Unformatted Text
Sorry, I forgot to mention that I tried "Record New Macro". The end result
was, let me say, not impressive!! Regards. "monir" wrote: Hello; I'll try to simplify what I'm trying to do without getting into too much details that might be considered irrelevant to my question. 1. A set of VBA procedures are run successfully, and the results are compiled on a single w/s "mySheet" in a single w/b "myBook". 2. I intend to repeat 1. above 1,000s of times (same w/b, same w/s). 3. Consider a single run. The results of interest on "mySheet" are confined to a range, say, A20:K40, named "myInpRange", with a 7-digit run identifier ID automatically generated and stored in cell F5, say, F5 = 1234567 4. I've successfuly performed the following tasks manually: ...a) copy range A20:K40 of "mySheet" ...b) Open a new MS Word document ...c) Paste Special as Unformatted Text ...d) Save the Word file for this run As: LL_1234567.inp (="LL_" & F5 & ".inp") ...e) Close the Word file. ...f) Repeat a) to e) above for the next run. Q: How to code a VBA Excel macro to handle Excel & Word, and run from a button on the w/s "mySheet" to perform the tasks a) to e) above ?? In case you might wonder why I do have to go through this trouble. Well, my next set of programs are DOS-Applications, which only allow their redirected input data files to be as described above. Your help would be greatly appreciated. Have a pleasant w/e. |
All times are GMT +1. The time now is 02:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com