Can not get he ActiveDocument.SaveAs2 method to work on Word 2013

For many years I have automated office applications from Visual Basic through the Office Object Model. This has been working fine for all versions from 2003 but
failed when I upgraded to Office 2013.
With Word 2013 the SaveAs2 method seems to ignore the parameters and instead always pops up the File SaveAs dialog. Irrespective of save or cancel the method then
always returns the error 4198.
The SaveAs2 method works fine in Word 2010 as well as SaveAs in earlier versions. According to the documentation for 2013 it should work the same way for the new
version, but so far I’m stuck with this problem.
I’m using Microsoft Office Home and Business 2013 on a Windows 8 system.
I’ve also tried the SaveAs2 directly in Microsoft Word VBA. The macro below gives exactly the same sad result.
Public Sub MySave()
Dim MyName As String
MyName = "TestDocument.doc"
ActiveDocument.SaveAs FileName:=MyName, FileFormat:=wdFormatDocument
End Sub
I seem to be completely stuck. Does anyone know what the trick is here?

Hello Dennis,
Thanks for your effort in trying to reproduce the prompt problem. Since my little macro example is supposed to work
 I’m not surprised that it works at your site. For whatever reason it does not work at mine. What’s causing this is beyond me, but from experience Microsoft products works in mysterious ways. At least it is persistent and fails every time
exactly as earlier described no matter what I do.
Here is the history behind this problematic system:
An Acer laptop with Windows 8 64 bit (Norwegian)  was bought in November 2012. This was intended as a reference system for any potential Win8 issues and also to double as a demo laptop when required.
The laptop had no Office preinstalled so an Office Home and business 2010 product key (32 bit Norwegian) was bought at the same time. This included a free upgrade to Office 2013 when released.
Office 2010 (32 bit) was downloaded and installed from
www.office.com/productkeycard and everything worked as supposed to including office automation.
A couple of weeks ago I then tried the promised Office 2013 upgrade from My Office/My Account and installed pressing the green Install button found on that page.
That’s when the problem started. After investigating I found this to be caused by the SaveAs2 problem and reproducible also by a simple Macro in a Word document.
The installation of Office 2013 had also left the Office 2010 on the system. By opening my new Word test document in 2010 the macro then failed exactly as on 2013 also on 2010.
I then went to Program and Features and uninstalled Office 2010. Still the same problem in Office 2013.
Program and features again, clicking change on Office 2013 and was presented by two choices offline or online repair. Tried offline first - same result,
 then online repair, when concluded I was asked to reactivate Office, but same result as before.
Since your answer I’ve also tried the following:
Went to Program and features and completely uninstalled my Office 2013.
Returned to  My Office/My Account and installed Office 2013 again. This did nothing to remedy the problem which remains exactly the same.
I've also done some further tests as an attempt to figure out what’s going on. I’ve made a new test document 
WEventTest.doc which in addition to my original macro also is catching the DocumentBeforeSave event. The WEventTest project consists of the following:
Added the following macros in Microsoft Word Objects/ThisDocument
Private X As New Class1
Public Sub Register_Event_Handler()
 Set X.appWord = Word.Application
End Sub
Public Sub MySave()
  Dim MyName As String
  On Error GoTo Skip
  MyName = "TestDocument.doc"
  ActiveDocument.SaveAs2 FileName:=MyName, FileFormat:=wdFormatDocument
  Exit Sub
Skip:   MsgBox Err.Number & " " & Err.Description
End Sub
Added Class1 to Class Modules containing the following macro
Public WithEvents appWord As Word.Application
Private Sub appWord_DocumentBeforeSave(ByVal  sDoc As Document, _
SaveAsUI As Boolean, Cancel As Boolean)
  Dim intResponse As Integer
  intResponse = MsgBox("Document: " & sDoc.Name & _
  " UI=" & SaveAsUI & " Save the document?", vbYesNo)
  If intResponse = vbNo Then Cancel = True
End Sub
I’ve then tried this on both my working Office 2010 system and failing Office 2013 system by first running the macro Register_Event_Handler and then MySave. There is a distinct difference between these system as follows:
On my working Office 2010 system, everything behaves as expected:
When calling MySave the DocumentBeforeSave event is fired as expected displaying the messagebox “Document: WEventTest.doc UI=True Save the document?
Selecting Yes saves the document as TestDocument.doc in the documents folder
Selecting No cancels the save and the SaveAs2 returns the error
 "4198 Command failed" as expected.
On my problematic Office 2013 system there is a marked difference in behavior:
When calling MySave, the first thing that happens is that the Save As prompt is displayed exactly as before with the document name WEventTest and filetype docx.
The document may then be saved by selecting in the prompt, but whether saving
 or canceling the same thing always happens.
After closing the prompt, THEN the DocumentBeforeSave event is fired. This is just too late. The message box shows the same content as for Office 2010, but the damage is already done.
Selecting Yes or No does not make the slightest difference now. The SaveAs2 method always returns the error 4198 Command failed
I'm not saying this is the first Microsoft problem I’ve encountered, but previously I’ve always been able to find answers by browsing forums and knowledge bases. This is actually the first time I’ve posted a question in any forum.
I also tried the direct support link you suggested, but that link seems to be broken.
Please advice.

Similar Messages

  • I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp

    I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp text, it wont let me. Just sounds the ding, alert, can still slightly navigate the program but can not use any other tools after clicking warp text. I just have to open task manager and close the program. not sure if I'm doing something wrong or maybe I just need to uninstall and re install. Having trouble finding out how to uninstall and reinstall because the program came pre installed on my desktop.

    It actually sounds like the warp text window is opening off screen.
    Resetting the photoshop elements 10 preferences should fix it.
    *Press and hold the Shift+Ctrl+Alt keys just after you start the launch of the photoshop elements 10 editor
    *Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop elements setting file
    *Press Yes

  • I am trying to import my cd's onto itunes on a new macbook pro. i can import the cd fine but can not get track names or album art work. after going into advanced it is just coming up with "CDDB information not available"

    i can import the cd fine but can not get track names or album art work. after going into advanced it is just coming up with "CDDB information not available"
    thank you

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • I can not get the download for indesign to work

    I can not get the download for indesign to work.

    Perhaps this Adobe Help document may help you:
    http://helpx.adobe.com/creative-suite/kb/download-install-trials.html?t2

  • I can not get the oil paint filter to work in photoshop CC

    Can anyone help me with getting the oil paint filter to work in photoshop CC. I have a high end gaming card for video but it still does not seem to be available. Help. please!

    You must be running Photoshop CC 2014.
    The Oil Paint Filter was present in Photoshop CC but removed in CC 2014
    Photoshop: Spring Cleaning | PHOTOSHOP.COM BLOG
    Photoshop Help | New features summary
    As a Cloud member you can still keep CC installed for when you need the Oil Paint filter.

  • I can not get my spot removal tool to work at all!!

    I have tried numerous times to get my spot removal tool to work; without success.   I have read tons about it and nothing works.  What is going on?? Neither clone nor heal does anything!
    I am very frustrated with Lightroom 3!
    tc

    Two things to check.

  • How can i get the Adobe plug in to work with Visio 2013?

    I purchased Adobe Acrobat x Pro recently and installed it, I have compatibility issues visio 2013. The adobe pdf converter  plug in stays inactive despite all my efforts to activate it, I need help with this? How can i get the plug in to work with Visio 2013?

    Should have purchased XI. According to Compatible web browsers and PDFMaker applications you will need Acrobat 11.0.1 -and- to be running the 32-bit Visio.

  • Can not get Samsung 22" LED TV to work with Mac Mini (2009), 'No Signal' message. any suggestions?

    I've just purchased a Samsung 5000series 22" LED TV to use with my Mac Mini (2009). I'm connecting using VGA with VGA adapter to MacMini. The TV is reading an error message saying there's no signal. Already tried with a 32" LG and it worked, as well as with a Dell moniter but can't seem to get this Samsung to work... PLEASE HELP!!

    That is not totally true. Instead of using an analog VGA connection, try using a Mini DisplayPort to HDMI Adapter and HDMI cable with that Samsung Monitor.
    About Mini DisplayPort to HDMI adapters

  • I can not get the add this extention to work today will you please fix it so I can use it as it is broken Please fix the add this button so that it will work!

    I get this error message Something went wrong in processing your request. (If you were a web browser, I would say "400 rate limited".) when I try to use the add this button extension for firefox. Will you please help me to fix this problem so that I will be able to use the add this again real soon thank u.

    This issue can be caused by corrupted cookies or cookies that are blocked.
    *check the permissions on the about:permissions page and in "Tools > Page Info > Permissions"
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"

  • I can not get ℠ 'sm' service mark code to work in my title bar

    Hello everyone,
    I want to be able to place 'sm' superscripted next to a company name in a website's title bar. Apparently the ℠ does not work in all cases...especially mine. Everyone else seems to have great luck.
    Graciously, Nadia offered this code for me to try:
    !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html  xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta  http-equiv="Content-Type" content="text/html; charset=utf-8"  />
    <title>Company Name  &#8480;</title>
    </head>
    but alas, it didn't work for me. My version of DW8 sets up the doctype with charset=iso-8859-1. I figured that was my proble, but changing this to utf-8 has made no difference. All I get is a small white box next to the company name. Firefox, IE6 both do the same thing.
    Any suggestions?
    Many thanks in advance.
    Cheers,
    wordman

    Have you looked at the Java Tutorial?
    JComboBox example:
    http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html
    There are a lot of other good examples and descriptions in the Java Tutorial.
    http://java.sun.com/docs/books/tutorial
    With your panel, just use add(aComponent) without the second parameter null.

  • Using windows vista I can not get the install to complete and work properly with a usb connection.

    I am running Vista (32 bit) and I was trying to update to new HP software.  Tried using full software install from file on HP website (release 14.0 full version).  When I try to install, it will not recognize the usb connection of the software.  I tried going back to version that came with the printer and had a similar problem.  Now I am stuck not being able to get either version 12 (which came with the system) or version 14 (new update on website).
    I need help trying to figure out how to get the software to go through and connect properly using usb and having the scan function working.......
    Any ideas.

    Hi,
    Have you tried plugging the USB into a differnt port at the back of your PC?
    IS the USB directly connected to your PC and not through any USB hub or extention?
    Do you see any response while plugging the USB to your computer?
    If yes, please clarify.
    I would also suggest trying a different USB cord, not longer than 2-3 meters long and check for any difference.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • I can not get the backup assistant plus to work on LG Enact cell.

    switched from Droid 4 to LG Enact, needed a keyboard and this was only option. The backup assistant does not work I receive an unknown error message daily. Not happy. I have tried Apps, settings, device, apps, All tab, backup assistant, force stop, ok, storage, clear data, ok... then tryed to sync - no go received same error message. help?

        mamajamma,
    Oh my, let's get to the bottom of this! Have you tried removing Backup Assistant off your phone and readding it? What error message are you getting?
    KarenC_VZW
    Follow us on Twitter @VZWSupport

  • HT201320 Can not get second aol email acct to work

    Have set up my aol email acct and have made several attempts to set up husbands too, but nothing I try will let me add his. Every time I go to aol mail and try to log on to his mail, it says password or username is no correct. Please help...hubby having surgery and will need to work from here. Thanks!

    contact TWC for the proper settings.

  • How can I get my new iPod shuffle to work in my 2013 Honda Fit?

    I keep getting an "unsupported device" display on the radio.

    Are you connecting it to a USB port on the car audio system?
    Does the car audio system have an aux. audio input mini-stereo jack?  If so, you can get something like this
    http://www.amazon.com/Monster-iCable-Player-Auxiliary-Input/dp/B002AR5XIK
    and connect the shuffle's headphones jack to the car audio system aux. audio input, set the car audio system to use that input, and play the shuffle through the car audio system.

  • Static NAT pass-through; can not get to work

    I am not having any luck getting a static NAT pass-through to work.
    BM3.8/NW6.5 all patched to the latest patches (no betas). IPFLT is NOT
    loaded.
    My internal network on one LAN all have 10.100.xxx.xxx private addresses.
    Dynamic NAT works great.
    I have secondary public IP addresses bound to my public NIC. Static NAT
    mapping between the secondary public IP addresses and the couple of
    individual private addresses work just fine. In other words, all has been
    working fine.
    I need to give one of those internal resources its public IP address
    (change it's private to its public).
    OK, I went into the NAT table and changed the proper public <-> private to
    public <-> public (identical addresses). I changed the internal computer
    to it's public address/mask with the same default gateway the server is
    using. The internal computer can now only ping itself; can't even ping
    it's default gateway. I did reinitialize, and also restarted. I can not
    get the pass-through connection to work.
    Any thoughts will be well received.
    Bob

    Robert,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

Maybe you are looking for