Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511

    Unanswered: Write text to file without the Quotes

    I would like to write a batch file from VBA but without the quotes. Here is some of the code followed by the results:
    HTML Code:
    Open myBatFileName For Output As #1
    Write #1, "@Echo Off"
    Write #1, "cd\"
    Batch file:
    "@Echo Off"
    "cd\"

    Thanks.
    Jerry

  2. #2
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511
    Here is the VBA solution to writing a text file without each line of text being surrounded by quotes:
    HTML Code:
    Open myBatFileName For Binary Access Write As #1
    Put #1, , "@Echo Off" & vbNewLine
    Put #1, , "cd\" & vbNewLine
    Close #1
    Results:
    @Echo Off
    cd\

    Jerry

Posting Permissions

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