Microsoft Word Error 4198
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 18:17:08 GMT by s_wx1011 (squid/3.5.20)
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API
Excel Vba Runtime Error 4198
Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums http://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-msoffice_custom/run-time-error-4198-in-filesave-in-global-template/d2878b38-7362-4440-b8ec-a6b7d4ba7632 Answered by: Word 2010 VBA: Run-time error '4198' Command Failed - MailMerge Microsoft Office for Developers > Word for Developers Question 0 Sign in to vote I have written a function in Excel 2010 using VBA that performs a mail merge in Word 2010 using a CSV file that I generatedwith data from the https://social.msdn.microsoft.com/Forums/office/en-US/99af2bc9-d2ee-4036-9901-afbc4c1b1174/word-2010-vba-runtime-error-4198-command-failed-mailmerge?forum=worddev Excel workbook. Function EmailVerstuurd() As Boolean Dim appWord As Word.Application Dim blnRunning As Boolean Dim doc As Document Dim strEmailInloggen As String Dim strRegje As String Dim i As Integer, rMail As Range Dim secAutomation As MsoAutomationSecurity 1 On Error GoTo Err_handler 'Capture the name of the procedure for debugging purposes 2 strProcedure = "EmailVerstuurd" 'Full path of mail merge main document 3 strEmailInloggen = "V:\Opleiding\Bedrijfsopleidingen\Typecursus\Procedures\Email inloggegevens nieuwe gebruiker.doc" 'Check if an instance of Word is already running 4 If modCode.IsAppRunning("Word.Application") Then 5 Set appWord = GetObject(, "Word.Application") 6 blnRunning = True 7 Else 8 Set appWord = CreateObject("Word.Application") 9 End If 'If necessary set registry key kb825765 / http://vba-corner.livejournal.com/3054.html 10 strRegje = "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options\SQLSecurityCheck" 11 If Not modFunctions.RegKeyExists(strRegje) Then 12 modFunctions.RegKeySave strRegje, "00000000", "REG_DWORD" 13 End If 'Put security to low kb886633 14 secAutomation = appWord.AutomationSecurity 15 appWord.AutomationSecurity = msoAutomationSecurityLow 'Open mail merge main document 16 Set doc = appWord.Documents.Open(FileName:=strEmailInloggen) 'Perform the mail merge - send email to
VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > Error 4198 on document.open - Word 2010 only! http://www.xtremevbtalk.com/word-powerpoint-outlook-and-other-office-products/322720-error-4198-document-word-2010-a.html Thread Tools Display Modes #1 11-17-2011, 01:45 AM George7a Saved by Grace Join Date: Mar 2005 Location: Nazareth Posts: 1,697 Error 4198 on document.open - Word 2010 only! Hi All, I am getting error 4198 in one of the PCs that has office 2010 on it. I know that the error is on error 4198 the document.open command: Code: Dim objWdApp As Object Set objWdApp = CreateObject("Word.Application") objWdApp.Visible = False objWdApp.ChangeFileOpenDirectory local_tmp + "\" objWdApp.Documents.Open FileName:=App.Path & "\" & filename, ConfirmConversions:=False, ReadOnly _ :=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate _ :="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="" _ , Format:=0 This code has been working on office 2000,2002,2003,2007 & 2010. But it doesn't work in some specific PCs that I runtime error 4198 do not have any idea what is special about them. The full error message is: Quote: Error number:4198. Command failed 36966. 0. wdmain11.chm. Microsoft Word Any ideas how to solve this? I have been searching for a clue, and found nothing useful. - George __________________ Read Matthew 24: 3-14 - sounds familiar? Escape This - The Best Escape Games Ever! | Games Walkthrough Technology Videos Angry Birds Star Wars Walkthrough George7a View Public Profile Find all posts by George7a #2 11-18-2011, 05:45 AM Jupiter 2 Centurion Join Date: May 2009 Location: Australia Posts: 101 I'm not particularly up to date with the code but local_tmp does not seem to be a valid variable. If you are trying to run the macro on a PC that hasn't been used to create the macro in the first place then the temp files created by the VB Editor will not have been made and any undeclared variables will cause errors. Also, Word 2007 and 2010 use .docx extensions and if you are still using .doc extension then