Reputation: 159
I have created a VBA macros for html conversion. After the conversion process, the word document should save as ".txt" file with UTF-8 encoding in the same path and same file name, when i click the command button.
Is it possible to make it?
Upvotes: 3
Views: 4313
Reputation: 7880
You need to pass the appropriate parameters to the SaveAs
method:
ActiveDocument.SaveAs _
FileName:="C:\My\Path\Textfile.txt", _
FileFormat:=wdFormatText, _
Encoding:=65001
Upvotes: 2