Saved = false after user has saved document 
Author Message
 Saved = false after user has saved document

Dear NG readers.

Problem:

My users create a new Word 2000 document based on a template, do their
editing and save the document.

When closing the document I'm having some VBA code firing (AutoClose
module), which checks if ActiveDocument.Saved = True.

However ActiveDocument.Saved is NOT set to True whether they use File|Save
or File|SaveAs ?

I have checked this by letting the user create the new document, edit it and
save it. Immediately after I'm checking in the VBA Editors Immediate Window

Debug.Print ActiveDocument.Saved

and get

False

Now - if I, still in the Immediate Window, save the document using VBA it's
OK, I.e:

ActiveDocument.Save
Debug.Print ActiveDocument.Saved
True

Another funny thing is that I don't have this problem on my own machine.

Do anybody out there have an idea?

Best regards




Sun, 10 Nov 2002 03:00:00 GMT  
 Saved = false after user has saved document
is your document in Page view ?
(this may force word to update fields like TOC or headers/footers just after
the file save ?)

Jakob Dam Kaergaard a crit dans le message ...

Quote:
>Dear NG readers.

>Problem:

>My users create a new Word 2000 document based on a template, do their
>editing and save the document.

>When closing the document I'm having some VBA code firing (AutoClose
>module), which checks if ActiveDocument.Saved = True.

>However ActiveDocument.Saved is NOT set to True whether they use File|Save
>or File|SaveAs ?

>I have checked this by letting the user create the new document, edit it
and
>save it. Immediately after I'm checking in the VBA Editors Immediate Window

>Debug.Print ActiveDocument.Saved

>and get

>False

>Now - if I, still in the Immediate Window, save the document using VBA it's
>OK, I.e:

>ActiveDocument.Save
>Debug.Print ActiveDocument.Saved
>True

>Another funny thing is that I don't have this problem on my own machine.

>Do anybody out there have an idea?

>Best regards





Mon, 11 Nov 2002 03:00:00 GMT  
 Saved = false after user has saved document
Dear Yann,

I have posted the following in the Word.NewUsers NG, as I have discovered
that it has nothing to do with VBA :

Dear NG readers

Word 2000 is displaying the "do you want to save changes..." dialog box even
though the user has just saved the document.

Situation:
NT Workstations with Office 2000/Word 2000

Scenario:
User A creates a template. User B creates a new document based on the
template, does his editing and saves the document. When closing the document
immediately after saving, the dialog box "do you want to save the
changes..." appear.

If user A creates a new document based on his own template there is no
problem.

If user B creates a template, the situation is reversed. I.e. user A gets
the "do you want..." dialog box and user B don't.

For the sake of testing I have created completely blank document (I.e.
without any fields, VBA modules etc.) and saved them as templates on user A
and user B's workstations respectively.

To really pin it out:
If user A creates a new document based on user B's template, the
ActiveDocument.Saved property is True. When he writes a single character the
ActiveDocument.Saved property changes to False (of cause). But when he
chooses File|Save or File|SaveAs and saves the document the
ActiveDocument.Saved is still False.
If I run the code ActiveDocument.Save the ActiveDocument:saved returns True.

Additional information:
The templates doesn't contain any information or fields in the header or
body. Neither does the Normal.dot template on either workstation.

Please help.

Best regards



Quote:
> is your document in Page view ?
> (this may force word to update fields like TOC or headers/footers just
after
> the file save ?)

> Jakob Dam Kaergaard a crit dans le message ...
> >Dear NG readers.

> >Problem:

> >My users create a new Word 2000 document based on a template, do their
> >editing and save the document.

> >When closing the document I'm having some VBA code firing (AutoClose
> >module), which checks if ActiveDocument.Saved = True.

> >However ActiveDocument.Saved is NOT set to True whether they use
File|Save
> >or File|SaveAs ?

> >I have checked this by letting the user create the new document, edit it
> and
> >save it. Immediately after I'm checking in the VBA Editors Immediate
Window

> >Debug.Print ActiveDocument.Saved

> >and get

> >False

> >Now - if I, still in the Immediate Window, save the document using VBA
it's
> >OK, I.e:

> >ActiveDocument.Save
> >Debug.Print ActiveDocument.Saved
> >True

> >Another funny thing is that I don't have this problem on my own machine.

> >Do anybody out there have an idea?

> >Best regards





Tue, 12 Nov 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 'Activedocument.saved = false' after save

2. set directory into which document will have to be saved by user

3. Avoid user interaction when saving Word document as html

4. Saving User Collections in Documents

5. Does me.dirty = false save the record?

6. How to create a shortcut or alias to the document upon saving the document

7. Saving page breaks from Word documents to text documents

8. Having trouble saving array in Session object

9. How to save MaskEdBox Blank Date Value having Mask ##/##/####

10. Having trouble with ForeColor when Enable is false

11. Excel and Word automation - disable Save/Save as

12. Excel Save vs Save As

 

 
Powered by phpBB® Forum Software