Opening byte[] as a file without actually saving it as a file first

孤街浪徒 提交于 2019-12-04 13:07:55

I doubt you're going to be able to feed Word a file in memory without saving it to at least a RAMDisk or something wild like that.

Why not use the system temp folder or the GetTempFile() method to write the byte array to a file just before opening it using Word and then cleaning up the temp files when you're done?

  string fullPathToATempFile = System.IO.Path.GetTempFileName();
// or
  string tempDirPath = System.IO.Path.GetTempPath();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!