使用“ADODB STREAM”的保存选项时Vba引发错误

时间:2014-09-09 08:58:21

标签: vba filestream adodb

Set InPut_file = CreateObject("adodb.stream")
Set OutPut_file = CreateObject("adodb.stream")

OutPut_file.Charset = "UTF-8"
OutPut_file.Open


InPut_file.Open
InPut_file.LoadFromFile mfp1_text_filePath
InPut_file.Charset = "unicode"

OutPut_file.WriteText InPut_file.ReadText

OutPut_file.SaveToFile "D:\A4\Message_tool\mfp1.msg", adSaveCreateOverwrite
OutPut_file.Close
InPut_file.Close

MsgBox "Copied to mfp1 File"

在运行时,会抛出错误,例如"参数类型错误,超出可接受的范围,或者彼此冲突。"

0 个答案:

没有答案