Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2016, 08:58 PM
SixSigmaGuy SixSigmaGuy is offline SaveAs problem Windows 10 SaveAs problem Office 2016
Novice
SaveAs problem
 
Join Date: May 2016
Posts: 4
SixSigmaGuy is on a distinguished road
Default SaveAs problem

I can't seem to do a saveas, saveas2, or save without the saveas dialog coming up. I've got it down to some pretty simple code that repros the problem every time.

Sub TestSaveAs()
Const FILE_TO_OPEN = "c:\temp\testopen.docx"
Const FILE_TO_SAVE = "c:\temp\testsave.docx"

Dim wd As Word.Document

Set wd = Word.Documents.Open(FILE_TO_OPEN)
wd.SaveAs2 FILE_TO_SAVE


wd.Close False
End Sub

It never reaches the wd.close command unless I do an on error resume next.

This only started happening recently, about the same time my machine was automatically upgraded to Office 2016. Doesn't happen in Excel, unless I create a Word object and use the Word's SaveAs2 method.

I've rebooted, rolled back (but not before Office 2016, as the restore point is no longer available), and everything else I could think of. Very frustrated. :-(
Reply With Quote
  #2  
Old 05-02-2016, 02:26 PM
SixSigmaGuy SixSigmaGuy is offline SaveAs problem Windows 10 SaveAs problem Office 2016
Novice
SaveAs problem
 
Join Date: May 2016
Posts: 4
SixSigmaGuy is on a distinguished road
Default

I moved my docm file to another computer, that has Office 2013, and had the same problem. Makes me think this is by design, but I don't understand why? If so, does anyone have a workaround? I need to open thousands of documents, one at a time, do some processing on them, and save them back to a different location, but I can't have it prompt me to do a saveas for each file. Note, too, that the saveas dialog always defaults to the folder I opened the document from, rather than the path I specified in the SaveAs2 parameters. The example above goes to the same folder for simplicity sake, but my actual requirement is to save to a different folder. Thus, not only do I have to click the ok button for every file, I also have to navigate to the correct folder.

Something else I didn't mention before. After I manually save to the new location using the saveas dialog, the save completes, but my program crashes with a "Run-time error '4198': Command Failed" error and my code never closes the document.
Reply With Quote
  #3  
Old 05-02-2016, 03:01 PM
macropod's Avatar
macropod macropod is offline SaveAs problem Windows 7 64bit SaveAs problem Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Have you tried repairing the Office installation (via Start > Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 05-02-2016, 08:31 PM
gmayor's Avatar
gmayor gmayor is offline SaveAs problem Windows 10 SaveAs problem Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Some add-ins can affect the behaviour of SaveAs - check your add-ins.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 05-03-2016, 10:13 AM
SixSigmaGuy SixSigmaGuy is offline SaveAs problem Windows 10 SaveAs problem Office 2016
Novice
SaveAs problem
 
Join Date: May 2016
Posts: 4
SixSigmaGuy is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Have you tried repairing the Office installation (via Start > Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair)?
Yes, I even did a full uninstall and re-install. While doing the uninstall, I did get a message about ClicktoRun or something like that. Any idea what that is?

Has anyone else tried running my sample code to see if they experience the same behavior?
Reply With Quote
  #6  
Old 05-03-2016, 10:49 AM
SixSigmaGuy SixSigmaGuy is offline SaveAs problem Windows 10 SaveAs problem Office 2016
Novice
SaveAs problem
 
Join Date: May 2016
Posts: 4
SixSigmaGuy is on a distinguished road
Smile Solved

Quote:
Originally Posted by gmayor View Post
Some add-ins can affect the behaviour of SaveAs - check your add-ins.
Wow!! You were right. I checked my Word addins and there was one there that didn't belong. I removed it and now my code works without the SaveAs dialog appearing. Thank You!!

The Addin was one added by Acer to save my documents to the AcerCloud. I had no idea my documents were being uploaded to their cloud.

BTW, I love your website, I've added it to my favorites. Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs problem SaveAs FileFormat ch1325 Excel Programming 8 04-11-2016 04:24 PM
SaveAs Doesn't work royersebastien Word VBA 0 03-23-2016 01:29 AM
SaveAs problem VBS saveas API behaviour is different from Menu saveas Ahmed AbuZekry Word VBA 2 03-23-2015 02:14 AM
SaveAs problem How to suppress saveas dialog from VB6 steveneashcraft Word VBA 15 05-09-2014 07:01 AM
SaveAs problem saveAs ChDir _ tinfanide Excel Programming 4 11-05-2011 01:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft