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
 
Top