Write to a text file from Macro

  • Thread starter SensibleSolutions
  • Start date
S

SensibleSolutions

How do I Open an existing text file and write a line to it from a
Macro inside MS Word?
 
K

Karl E. Peterson

SensibleSolutions said:
How do I Open an existing text file and write a line to it from a
Macro inside MS Word?

In a nutshell...

hFile = FreeFile
Open FileName For Append As #hFile
Print #hFile, "New line of text..."
Close #hFile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top