把数据库中二进制文件读入到本地Word中,读入写入到正确,进程中也有word进程,关闭进程打开保存的word文件,文件内容也正确,就是Word窗口显示不出来? Dim wordapp As New Word.Application
SPrintDOCName = "d:\ddd.doc"
Dim fsTemp As New System.IO.FileStream(SPrintDOCName, IO.FileMode.Create)
Dim Sfile() As Byte
Sfile = dset.Tables("PrintTAble").Rows(0).Item("FileNR")'这Dataset是从数据库中读入的内容
fsTemp.Write(Sfile, 0, Sfile.Length)
fsTemp.Close()
wordapp.Documents.Add(SPrintDOCName, False)
wordapp.Visible = True谢谢,帮忙看看吧?为什么呢?
SPrintDOCName = "d:\ddd.doc"
Dim fsTemp As New System.IO.FileStream(SPrintDOCName, IO.FileMode.Create)
Dim Sfile() As Byte
Sfile = dset.Tables("PrintTAble").Rows(0).Item("FileNR")'这Dataset是从数据库中读入的内容
fsTemp.Write(Sfile, 0, Sfile.Length)
fsTemp.Close()
wordapp.Documents.Add(SPrintDOCName, False)
wordapp.Visible = True谢谢,帮忙看看吧?为什么呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货