Hi,
In word macro such thing worked perfectly:
With ActiveDocument
.SaveEncoding = msoEncodingUTF8
.SaveAs FileName:="c:\t est.doc",
FileFormat:=wdF ormatUnicodeTex t
End With
When I tried to use it in pure VB.net I put:
oWord = CreateObject("W ord.Application ")
With oWord.ActiveDoc ument
.SaveEncoding = msoEncodingUTF8
.SaveAs FileName:="c:\t est.doc",
FileFormat:=wdF ormatUnicodeTex t
End With
but all the time got an error in 'saveEncoding' line. I tried with
msoEncodingUTF8 , with string "msoEncodingUTF 8" and with
oWord.msoEncodi ngUTF8 but all the time got some errors (like {"Type
mismatch (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMIS MATCH))"}
How can I make it works??
Thank you, mark
In word macro such thing worked perfectly:
With ActiveDocument
.SaveEncoding = msoEncodingUTF8
.SaveAs FileName:="c:\t est.doc",
FileFormat:=wdF ormatUnicodeTex t
End With
When I tried to use it in pure VB.net I put:
oWord = CreateObject("W ord.Application ")
With oWord.ActiveDoc ument
.SaveEncoding = msoEncodingUTF8
.SaveAs FileName:="c:\t est.doc",
FileFormat:=wdF ormatUnicodeTex t
End With
but all the time got an error in 'saveEncoding' line. I tried with
msoEncodingUTF8 , with string "msoEncodingUTF 8" and with
oWord.msoEncodi ngUTF8 but all the time got some errors (like {"Type
mismatch (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMIS MATCH))"}
How can I make it works??
Thank you, mark
Comment