• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1947
  • Last Modified:

VBA using MS Word 2013 will not save Document

I am using the following statement to save the MS Word 2013 document after I updated a value in a bookmark.  This is being done with VBA

If ActiveDocument.Saved = False Then ActiveDocument.Save

A Save As dialogue box pops open rather than saving the document, when I click on the Save button in the dialogue box the Save As dialogue box pops open again and the document is not saved.

The code works correctly on the development machine but not on the machine I want the code to run on.  Both machine are running Office 2013 and Windows 7.  The problem is not a permissions problem, I changed the permissions to allow everyone to do everything just to check.
0
c7c4c7
Asked:
c7c4c7
  • 3
  • 3
1 Solution
 
BembiCEOCommented:
You may check the optional argumetns of the save method. As long as you do not define the arguments, the save methods works with the default settings.
0
 
DrTribosCommented:
I ran into a similar strangeness in Excel... it was, if you will the reverse problem, I had to save for a change to take effect.

Is it the case that prior to saving the only change to the document is the update to the bookmark?  If so, can I suggest making some other changes with VBA like adding some blank space at the end of a paragraph then trying the save.
0
 
c7c4c7Author Commented:
I made changes to the document using VBA other than the bookmark and it still doesn't work.

What I don't get is why it works on one machine and not another it's like there is some unique reference that needs to be added, but everything seems to have migrated correctly.

The one thing I see that is different is that the developing machine has reference to something called a Template Project that did not make it over when I copied the .docm to the new machine
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
DrTribosCommented:
The only other thing I can suggest is a corrupt user profile, can you try on the impacted machine under a new profile that you create from scratch?
0
 
c7c4c7Author Commented:
Solved my own problem
In the IDE for VBA under Tools -> Reference the reference to the TemplateProject was marked as missing.  I unchecked it and a miracle occurred, the SaveAs box no longer appeared.
0
 
DrTribosCommented:
How random - thanks for the follow-up
0
 
c7c4c7Author Commented:
It worked
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now