Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word SaveAs prompting for save location

Status
Not open for further replies.

dgates1

Programmer
Jul 24, 2014
2
US
Hi everyone,
So, I have been programming in VBA for around 5 years (as well as other languages like Java, c#, Python, etc), and this has me completely stumped. Part of an Ms Access solution automates populating around 5000 customer letters in Ms Word documents each quarter. Now, all of the sudden when it attempts to save a new document Word is prompting for the save location, even though it's provided in the SaveAs call. As far as I can tell this is only occurring on one workstation, on which I've done an office repair, and wiped the user profile. Office is being reinstalled as I write this.

Has anyone ever ran into this before? Unfortunately, this is a remote machine at a customer site, and the only machine I have access to test on their network, and replacing or swapping it out is not an easy request.

To isolate the issue I recreated the same concept within word with a simple method that opens a new word document and attempts to save it to a local directory, taking access and network issues out of the equation, and I receive the same result. Simple test code:
Sub test()
Dim doc As Document
Set doc = Documents.Add ''Create a document
doc.SaveAs FileName:="C:\Test\Test.docx" ''Save the document
End Sub

Any thoughts?
 
It will normally ask this if the user does not have write access to the directory or the file. Check the permissions with cacls (XP) or icacls on Vista/W7/W8.
 
Hi xwb, actually if the user doesn't have permissions to the directory it will typically return a useful error message like access denied. I've had many automated tasks attempt to write to places where permissions have been inadvertently removed :)

And my test was a test folder that I created on the local machine on the c drive, just to make sure that wasn't an issue.

Any other thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top