K
koala
Hi,
I'm trying to save a document from a web click as described in the
knowledge base article.
http://support.microsoft.com/kb/316384/EN_US
Instead of using Windows Application I use web application asp button to do
the work. I'm trying to save the document. However, both save and saveAs
doesn't not work for some reason. Here is the code for save:
object fileName = "c:\\MyNewDocument.doc";
oWord.Documents.get_Item(ref fileName).Save();
It gives me this error:System.Runtime.InteropServices.COMException: Bad file
name
When I try to use saveAs as follow:
oDoc.SaveAs(ref fileName, ref missingValue,ref missingValue, ref
missingValue, ref missingValue,ref missingValue, ref missingValue, ref
missingValue,
ref missingValue, ref missingValue, ref missingValue,ref missingValue, ref
missingValue, ref missingValue,ref missingValue, ref missingValue);
It hangs forever and does not go through.
I'm thinking that I should use SaveAs as the same behaviour of word, is that
true? If we don't save the document, would it appear in anywhere in the
default path?
Thanks for the help in advance
Koala
I'm trying to save a document from a web click as described in the
knowledge base article.
http://support.microsoft.com/kb/316384/EN_US
Instead of using Windows Application I use web application asp button to do
the work. I'm trying to save the document. However, both save and saveAs
doesn't not work for some reason. Here is the code for save:
object fileName = "c:\\MyNewDocument.doc";
oWord.Documents.get_Item(ref fileName).Save();
It gives me this error:System.Runtime.InteropServices.COMException: Bad file
name
When I try to use saveAs as follow:
oDoc.SaveAs(ref fileName, ref missingValue,ref missingValue, ref
missingValue, ref missingValue,ref missingValue, ref missingValue, ref
missingValue,
ref missingValue, ref missingValue, ref missingValue,ref missingValue, ref
missingValue, ref missingValue,ref missingValue, ref missingValue);
It hangs forever and does not go through.
I'm thinking that I should use SaveAs as the same behaviour of word, is that
true? If we don't save the document, would it appear in anywhere in the
default path?
Thanks for the help in advance
Koala