+ Reply to Thread
Results 1 to 7 of 7

Macro to save text string as an MS-DOS format text document

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    15

    Macro to save text string as an MS-DOS format text document

    I have a template in excel that is set up to take data entered into a table, and convert it into a text sting to import into another program I use for work. Currently, to import the data into the program, we copy the text string without formatting into wordpad, and save it as a Text Document MS-DOS format .dat file.

    To import the data into the program, I must copy the link to the program into Run followed by the link to the .dat file.

    Is there a way to automate this function with a macro in wordpad?

    If it isn't possible to do this through wordpad, is it possible to save to a text document MS-DOS format .dat file through a different method?
    Last edited by bwink88; 12-13-2013 at 02:23 PM.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Macro to save text string as an MS-DOS format text document

    Hi,

    Can you post a sample file and the output (dat file) to suggest a solution apt for your requirement.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to save text string as an MS-DOS format text document

    You can probably do what you want in Excel. See the following code that writes directly to a text file from Excel. You may be able to replace the text I have with the contents of cells in the workbook.

    Please Login or Register  to view this content.
    Lewis

  4. #4
    Registered User
    Join Date
    12-13-2013
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro to save text string as an MS-DOS format text document

    The site won't let me upload a .dat file, so I converted it to .txt for the purpose of this example.

    The link I would copy into Run to use to upload looks like:

    S:\wfx32\TDIN Admin S:\SHARED\TD IN\examp_0120131213.dat
    ^Link for import program ^Link to test string .dat file
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Macro to save text string as an MS-DOS format text document

    Hi,

    here you go.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-13-2013
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Macro to save text string as an MS-DOS format text document

    Thank you very much for the posts, they were very helpful. I have just started fumbling around with macros, and am trying to learn more about them, but I only get to work on them every now and then in down time. I have been using posts on the internet to help find my way around them. I'm considering buying a couple books off amazon on macros. Do either of you have a recomendation for a beginner?

  7. #7
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Macro to save text string as an MS-DOS format text document

    @bwink88 ,

    Spend more time on this forum and you will definitely learn a lot about excel macro (vba) and function.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  2. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM
  3. Macro to copy from a text document into excel document
    By JRoder in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-25-2012, 07:31 PM
  4. Help with a Macro to copy from a text document into excel document
    By JRoder in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 07:41 PM
  5. date format in save as text macro
    By zbvodz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-03-2008, 07:58 AM

Tags for this Thread

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