D
dpop3951
I've built a Word add-in that saves the document if the user tries to
print it (for legal reasons -- prevents them from changing the document
and printing it without saving the changes). The documents reside on a
SharePoint (SP) v2 server. When I call the Document.Save method it
prompts me with a save dialog. I assume SP has its own hooks in the
save event. Canceling out of the save dialog throws a command failed
exception. If the document is not in SP it works fine.
Using Document.SaveAs()
If I call Document.SaveAs() and pass it the document's same SP URL it
throws an exception. If I call Document.SaveAs() and pass it a new
document URL, say by just appending a 1 to the filename, it works.
Anyone know a way to just save the document. Either by telling it to
overwrite an the existing document or telling SP to replace with new
doc? Or am I just missing something obvious?
Thanks,
Dani
print it (for legal reasons -- prevents them from changing the document
and printing it without saving the changes). The documents reside on a
SharePoint (SP) v2 server. When I call the Document.Save method it
prompts me with a save dialog. I assume SP has its own hooks in the
save event. Canceling out of the save dialog throws a command failed
exception. If the document is not in SP it works fine.
Using Document.SaveAs()
If I call Document.SaveAs() and pass it the document's same SP URL it
throws an exception. If I call Document.SaveAs() and pass it a new
document URL, say by just appending a 1 to the filename, it works.
Anyone know a way to just save the document. Either by telling it to
overwrite an the existing document or telling SP to replace with new
doc? Or am I just missing something obvious?
Thanks,
Dani