Word VBA fails to save document

This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.


Thread Starter
Oct 10, 2008
I'm hoping someone might be able to point me in the right direction with what appears to be a problem with Word.

I have a Lotus Notes application that stores a lot of information, and part of that is output to a word document for printing. A user opens a document in Lotus Notes, presses a button and a Word document is created with the relevant information in it. It does this by getting Notes to launch a Word template file with the layout how we want it, and passing an XML file with all the required values from Notes so that a VBA function in the Word template can read this information in. It's quite a convoluted way of doing things I'll agree, but I am just working with a a system that was developed a long time ago and in most cases it works well.

When the user is done making any changes to the Word document, there is a macro button in Word that they press to mark the document complete. This makes the document readonly, sets a few custom properties and then saves the document.

In most cases, if you were to run through the process, everything works fine. Sometimes however, a small number of users are finding that their work isn't saved. If for example they launch a new word document, make changes and then close word, then go back to that document and make more changes before pressing the Complete button in Word, they find that the next time they go to the document it's in the state before their most recent changes, which are lost.

The Complete button calls various functions to do the custom things we need like updating the properties, and generating a new XML file that Notes will then read, and finally it calls Activedocument.Save. I added some code to check the Saved property after this in case there was a problem saving the document, if activedocument.Saved = False, I call activedocument.SaveAs to save the document in a backup location.

The XML file that is created for Notes to read back in when the Complete button is pressed contains the changes that the user made, but if they open the word document it does not contain the latest changes.

It seems to me that something is going wrong when word tries to save the document, but it's incorrectly setting the Saved property otherwise we'd see the document being saved elsewhere and we're not.

The users are all working in a Citrix environment, using Word 2002 or Word 2003 - we've seen this problem with both versions. The files they create are being stored in a share on a central file and print server to which they have the correct level of access.

Could a network issue cause the document to not be saved? Are there any bugs in Word where it incorrectly reports the save? The only reason I think it's word with the problem is like I said, Word also creates the XML file when the complete button is pressed and this contains all the changes that were made.

Sorry for the long post, but I'm getting a lot of users moaning to me now and I can't offer any explanation as to why they are losing their changes in Word.

Cheers for any help you can provide.
Jun 17, 2002
I would look at folder permissions first on the network for the affected users, as compared to the ones that are working.
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online