Use shared access for the WORD Document so that the code will not crash,
This commit is contained in:
parent
c67d516743
commit
7de1b026fe
@ -241,7 +241,7 @@ namespace Volian.Controls.Library
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
FileInfo fi = new FileInfo(temppath);
|
FileInfo fi = new FileInfo(temppath);
|
||||||
FileStream fs = File.Open(temppath, FileMode.Open, FileAccess.Read, FileShare.None);
|
FileStream fs = File.Open(temppath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||||
long len = fs.Length;
|
long len = fs.Length;
|
||||||
byte[] ByteArray = new byte[len];
|
byte[] ByteArray = new byte[len];
|
||||||
int nBytesRead = fs.Read(ByteArray, 0, (int)len);
|
int nBytesRead = fs.Read(ByteArray, 0, (int)len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user