5941 Error Word
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Sun, 02 Oct 2016 22:04:59 GMT by s_hv1000 (squid/3.5.20)
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability
Runtime Error 4248 This Command Is Not Available Because No Document Is Open
Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST
Run-time Error '5941' Application-defined Or Object-defined Error
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 run time error 5941 word 2013 Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Run-time error '5941' the requested member of the collection does not exist Microsoft http://answers.microsoft.com/en-us/msoffice/forum/msoffice_word-mso_other/run-time-error-5941-not-always-but-annoyingly/b95ec1db-6928-4d87-b799-52d4f1c01f08 Office for Developers > Word for Developers Question 0 Sign in to vote I have followed Greg's instructions for check boxes on http://gregmaxey.mvps.org/Add_Toggle_Objects.htmbut when I double click on the box it gives me the run time error. I have saved as a template (.dotm) and then saved document as a .docm but always get the same error. Would love this to https://social.msdn.microsoft.com/Forums/office/en-US/8ffb33d5-a876-49c2-aaf3-22c02257c903/runtime-error-5941-the-requested-member-of-the-collection-does-not-exist?forum=worddev work as I can not have both controls and legacy form controls in same document - good on you microsoft! Any help would be great. Wednesday, July 07, 2010 7:31 AM Reply | Quote Answers 0 Sign in to vote I assume that when you get the error, one of the two macros named CheckIt or UncheckIt is highlighted in the VBA editor. The most likely reason for that error is that the template you're working with does not contain an AutoText entry named "Checked Box" or "Unchecked Box". (Unfortunately VBA's error handler never specifies which collection it's complaining about, but in this case the AutoTextEntries collection is the only one involved in the code.) Greg's steps 3 and 4 are written for Word 2003 or earlier, and they need some additional information for Word 2007 or 2010. In Word 2007 or 2010, AutoText has become part of the larger Building Blocks feature. You should have noticed that the dialog you get when you press F3 is different from the one shown on Greg's page; now it's a Create New Build
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/34617417/5941-error-the-requested-member-of-the-collection-does-not-exist-word-macro Business Learn more about hiring developers or posting ads with us Stack Overflow Questions http://www.vbaexpress.com/forum/showthread.php?33960-Solved-Word-Runtime-error-5941 Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 5941 Error The requested member of the collection does not exist Word Macro up vote 0 down vote favorite Good Day time error all. I'm far from a programmer however i need assistance finding out the error with this VBA script. It is run in a word document for repair order form. Its purpose is to increase the order number by one for each print. The counter updates a .txt file To identify the next number needed to print. That as far as my understanding goes. The code is below. Sub serialNumberPrint() ' ' SerialNumber Macro ' error 5941 word ' Dim Message As String, Title As String, Default As String, NumCopies As Long Dim Rng1 As Range ' Set prompt. Message = "Enter the number of copies that you want to print" ' Set title. Title = "Print" ' Set default. Default = "1" ' Display message, title, and default value. NumCopies = Val(InputBox(Message, Title, Default)) SerialNumber = System.PrivateProfileString("C:\Users\GaleR\Documents\SettingsSerial.Txt", _ "MacroSettings", "SerialNumber") If SerialNumber = "" Then SerialNumber = 1 End If Set Rng1 = ActiveDocument.Bookmarks("SerialNumber").Range Counter = 0 While Counter < NumCopies Rng1.Delete Rng1.Text = Format(SerialNumber, "000#") ActiveDocument.PrintOut SerialNumber = SerialNumber + 1 Counter = Counter + 1 Wend 'Save the next number back to the Settings.txt file ready for the next use. System.PrivateProfileString("C:\Users\GaleR\Documents\SettingsSerial.txt", "MacroSettings", _ "SerialNumber") = SerialNumber 'Recreate the bookmark ready for the next use. With ActiveDocument.Bookmarks .Add Name:="SerialNumber", Range:=Rng1 End With ActiveDocument.Save End Sub The debug brings me to this line: Set Rng1 = ActiveDocument.Bookmarks("SerialNumber").Range I am at wits end and am not sure how to proceed. I apologize beforehand for my lack of knowledge but really do need the assistance. vba ms-word word-vba share|improve this question edited Mar 29 at 14:15 Ben Rhys-Lewis 2,24581434 asked Jan 5 at 17:12 Dwayne Bellot 1 Can you elaborate on what the expected behavior is and what the actual output is? Does the script fail, outp
VBA Code & Other Help Word Help Solved: Word Runtime error '5941' If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: Solved: Word Runtime error '5941' Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 09-09-2010,12:59 PM #1 Mifty View Profile View Forum Posts View Blog Entries View Articles VBAX Newbie Joined Sep 2010 Posts 3 Location Solved: Word Runtime error '5941' Hi, I'm hoping someone can help please. I've been trying to adapt Dian Chapman's code for autofilling an Access database record from a Word Autoform. I'm not skilled in either Word or Access but have used VBA in Excel. I've downloaded the sample db and word form from mousetrax.com Autoforms with grateful thanks to Dian The original form and database work fine. But when I run this from Command Button 1 to check if record exists NB comments have not been changed from orig code [FONT=Arial]Private Sub CommandButton1_Click()[/FONT] [FONT=Arial] 'declare variables for new connection and recordset and declare variables[/FONT] [FONT=Arial]Dim vConnection As New ADODB.Connection[/FONT] [FONT=Arial]Dim vRecordSet As New ADODB.Recordset[/FONT] [FONT=Arial]Dim vDeptCode As String[/FONT] [FONT=Arial]Dim vDept As String[/FONT] [FONT=Arial]Dim vJob1, vJob2, vJob3, vJob4 As String[/FONT] [FONT=Arial] 'provide connection string for data using Jet Provider for Access database[/FONT] [FONT=Arial]vConnection.ConnectionString = "data source=c:\computorcompanion\JobLog.mdb;" & _[/FONT] [FONT=Arial]"Provider=Microsoft.Jet.OLEDB.4.0;"[/FONT] [FONT=Arial] 'open connection[/FONT] [FONT=Arial]vConnection.Open[/FONT] [FONT=Arial] 'test connection state...this can later be com