+ Reply to Thread
Results 1 to 2 of 2

Exporting Excel Data As Unformatted Text

  1. #1
    monir
    Guest

    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.

  2. #2
    monir
    Guest

    RE: 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.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1