Microsoft Word Error 5941
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 15:52:10 GMT by s_wx1085 (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 Office Add-ins Changelog Microsoft Graph API Office 365
Runtime Error 4248 Word 2013
Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office
Run-time Error '5941' Application-defined Or Object-defined Error
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 the requested member of the collection does not exist word 2013 My Forums Answered by: Run-time error '5941' the requested member of the collection does not exist Microsoft Office for Developers > Word for Developers Question 0 Sign in to vote I have followed Greg's instructions http://answers.microsoft.com/en-us/office/forum/office_2010-word/run-time-error-5941-not-always-but-annoyingly/b95ec1db-6928-4d87-b799-52d4f1c01f08 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 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, 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 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 Building Block dialog with more boxes. To get an AutoText entry, you MUST change the Gallery box from "Quick Parts" to "AutoText". Also, to make the AttachedTemplate part of the code work, you MUST change the Save In box from Building Block.dotx to the name of the template that contains the code. O
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/15146088/what-vba-code-should-be-used-in-microsoft-word-2007-macro-to-create-table-of-con to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the time error Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What VBA code should be used in Microsoft Word 2007 Macro to create Table of Contents up vote 2 down vote favorite I runtime error 4248 would like to define a macro in Microsoft Word 2007 that inserts a table of contents with the provided automatic styles when a hotkey is pressed. I successfully defined a macro to insert a non-styled (e.g. basic) table of contents as follows: Sub InsertTableOfContents() ' ' InsertTableOfContents Macro ' ' With ActiveDocument .TablesOfContents.Add Range:=Selection.Range, RightAlignPageNumbers:= _ True, UseHeadingStyles:=True, UpperHeadingLevel:=1, _ LowerHeadingLevel:=3, IncludePageNumbers:=True, AddedStyles:="", _ UseHyperlinks:=True, HidePageNumbersInWeb:=True, UseOutlineLevels:= _ True .TablesOfContents(1).TabLeader = wdTabLeaderDots .TablesOfContents.Format = wdIndexIndent End With End Sub However, when I attempt to insert a styled table of contents as follows: Sub InsertStyledTOC() ' ' Macro to insert a table of contents styled like Automatic Table 2 ' ActiveDocument.AttachedTemplate.BuildingBlockEntries("Automatic Table 2"). _ Insert Where:=Selection.Range, RichText:=True End Sub I get the following error: Run-time error 5941 The requested member of the collection does not exist I beleive this indicates that the referenced member of BuildingBlockEntries (e.g. Automa