P
Pete
Hi there.
Part of a Word app I'm creating in VBA involves reading and parsing a
text file to transform the contents into a properly styled Word
document.
I'm doing this on a DocumentChange event, where I check the save type
of the file and check the first few characters for a tag before going
on to my transformation code.
However, some of the text files contain non-ASCII characters (open and
close quotes for examples). The problem with this is that Word then
displays a message asking for confirmation of the file type. This
message destroys the event handling so execution is halted at that
time.
I was thinking that if I could MIME encode the text file, I should be
able to bypass the conversion dialog and let the text come through as
UTF-8 or charset iso-8859-1.
Has anyone had an experience doing this, or knows of a way to force
the charset when opening a text file?
Part of a Word app I'm creating in VBA involves reading and parsing a
text file to transform the contents into a properly styled Word
document.
I'm doing this on a DocumentChange event, where I check the save type
of the file and check the first few characters for a tag before going
on to my transformation code.
However, some of the text files contain non-ASCII characters (open and
close quotes for examples). The problem with this is that Word then
displays a message asking for confirmation of the file type. This
message destroys the event handling so execution is halted at that
time.
I was thinking that if I could MIME encode the text file, I should be
able to bypass the conversion dialog and let the text come through as
UTF-8 or charset iso-8859-1.
Has anyone had an experience doing this, or knows of a way to force
the charset when opening a text file?