Does anyone know if Document.Properties is broken in X7?
I am re-writing and old macro as a dll docker. Most of my files have data saved in the Document.Properties via VBA (which will eventually be written via the docker). My problem is that when I close a document and reopen it, the properties are all wiped clean.
Here is the chronology of the event...
The problem here is that after having written said data when I re-open the document, the data is gone. I'm beginning to think that Draw is erasing the info at some step of the process.
My suggestion is to create a simple test just to check if it is working. Here are to simple Subroutines:
Sub SetDocumentProperties() With ActiveDocument .Properties("MyMacro", 1) = "Test 1" .Properties("MyMacro", 2) = 1 End With End Sub Sub GetDocumentProperties() With ActiveDocument MsgBox .Properties("MyMacro", 1) MsgBox .Properties("MyMacro", 2) End With End Sub
Run the SetDocumentProperties, save your document, Open your document and run GetDocumentProperties. Are they returned correctly? They are for me. So we know this is working, it much be something in your code. ;-) I know, not what you wanted to hear.