Save .vsd as .vsdx breaks Last Edit Date in Visio 2016

Started by Anondood, April 14, 2020, 08:48:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Anondood

NO
You can open and edit it 4 times and it always shows the time when OPENED.
I did an edit at 1010 and saved
Opened at 1011 and it showed 1011
Edited file at 1011 and saved
Opened file at 1012 and it showed 1012
and on and on . . . . .

wapperdude

I agree, the behavior has changed.  It is easy enough to test.

Take an existing VSD file.  Edit it to include include a shape that shows both DOCLASTEDIT() and DOCLASTSAVE().  Save.  Then Save AS VSDX.

Close the file, or Exit Visio.  Wait awhile.  Open  the VSD file, and save.  Close.  The VSD file should show different edit and save dates.  The save date should be more recent.  On V2019, this is the case.  Now open the VSDX file.  You would expect that both dates are the same.  They're not.  The DOCLASTEDIT shows the current date when the file was opened.  The Save Date is still the last time saved.

Whether or not the behavior change is intentional or not, it does exist.
Visio 2019 Pro

Anondood

OK, I just verified that.

Original .vsd  --  DOCLASTEDIT() and DOCLASTSAVE() do NOT change after opening
Original .vsdx  --  DOCLASTEDIT() and DOCLASTSAVE() do NOT change after opening
Original .vsd saved as .vsdx  --  DOCLASTEDIT() ALWAYS changes to current time when opened, DOCLASTSAVE() does not change

So that proves that saving a .vsd as a .vsdx breaks DOCLASTEDIT() behavior.

So is there any way to:
a.  Prevent this from happening?
b.  "Fix" broken files?


Surrogate

A. IMHO, it is imposible. Because visio core change it
B. You must write macro which
1. Iterate all documents
a) get TimeEdit property
b) convert to vsdx
c) rename vsdx to zip
d) unzip this archive
e) find in one xml-document TimeEdit cell
f) replace it value to value what you get in step a.
g) save xml, and create new zip archive
h) repair this archive
i) rename to xxx.vssx