Set a Word / Excel / Powerpoint Document to be completely "unsaved"

Add-in Express™ Support Service
That's what is more important than anything else

Set a Word / Excel / Powerpoint Document to be completely "unsaved"
Revert a document back to having "never been saved" 
Pino Carafa




Posts: 162
Joined: 2016-09-28
We have developed an Add-in for use in Word/Excel/PowerPoint .... This add-in saves the (say) Word Document into our document management system.

One situation that could arise is that the user is creating a brand new document and they hit our "Save" button. Because the document is brand new, it is just called something like "Document1" and it does not yet have a .FullPath

So we save the document to a some\path\Recovery location, and then we try to upload the document to the document management system. Now imagine something happens, dunno, a power cut. you name it.... and the upload fails.

We can tell from the document (through user properties) whether it was already in the system or not. So when we re-start Word / Excel / PP we can look at this recovery location and if there's a document there we can tell easily enough whether it was a brand new one they tried to save or one that had already been saved and perhaps was just being updated.

So I'm wondering whether it's possible to open a local Word Document and then somehow revert it to a state where it's treated as a brand new document, with no .FullPath?
Posted 13 Nov, 2020 09:32:04 Top
Andrei Smolin


Add-in Express team


Posts: 18847
Joined: 2006-05-11
Hello Pino,

No such way exists. I'd suggest that you insist on saving any document before you save it to your system.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Nov, 2020 09:37:21 Top
Pino Carafa




Posts: 162
Joined: 2016-09-28
Thanks Andrei, that's ok.... Just wanted to make sure. I suspected as much :)
Posted 13 Nov, 2020 09:53:40 Top
Andrei Smolin


Add-in Express team


Posts: 18847
Joined: 2006-05-11
Welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 13 Nov, 2020 10:04:59 Top