Error 5941 Vb
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 04:53:42 GMT by s_ac15 (squid/3.5.20)
here for a quick overview of run-time error '5941' application-defined or object-defined error the site Help Center Detailed answers to any run time error 4605 word 2010 questions you might have Meta Discuss the workings and policies of this site About runtime error 4248 word 2010 Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow 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 Questions 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 Runtime Error '5941' The Requested http://stackoverflow.com/questions/30705042/runtime-error-5941-the-requested-member-of-collection-does-not-exist Member of Collection Does Not Exist up vote -1 down vote favorite When running the macro I am getting the following error: "Runtime Error '5941' The Requested Member of Collection Does Not Exist" The line below is highlighted in Yellow; This Macro works on the majority of users and the error has only been reported off two users. Windows(DestTemplateName).Document.Bookmarks("fCustomer").Range.Fields(1).Result.Text = Windows(SourceTemplateName).Document.Bookmarks("fCust").Range.Fields(1).Result.Text Any Help Would Be Much Appreciated. Sub PopulateBookingForm() Dim SourceTemplateName As String, DestTemplateName As String ' Set Method Statement Name SourceTemplateName = ActiveDocument.Name ' Open Heavy Cranes ICO Booking Form ChangeFileOpenDirectory "\\SERVERSHARE\HCD\HCD General\Templates\" Documents.Open FileName:= _ "\\SERVERSHARE\HCD\HCD General\Templates\Heavy Cranes ICO Booking Form.docx", _ ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _ wdOpenFormatAuto, XMLTransform:="" Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting ' Set Haulage Booking Form Document Name DestTemplateName = Activ
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk http://www.tek-tips.com/viewthread.cfm?qid=1682609 With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips time error Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. VBA Visual Basic for Applications (Microsoft) Forum at Tek-Tips HomeForumsProgrammersLanguagesVBA Visual Basic for runtime error 4248 Applications (Microsoft) Forum Run-time error 5941 only in the Word templates thread707-1682609 Forum Search FAQs Links MVPs Run-time error 5941 only in the Word templates Run-time error 5941 only in the Word templates Lumpazi (TechnicalUser) (OP) 8 May 12 15:14 HelloI have been trying to get this Macro to work but I have had no luck.It works fine, but when I put my word file with the macro in "My templates" it shows me an error:Run-time error 5941The request member of the collection does not exist.The error occurs in this line:For Each Zelle In ActiveDocument.Tables(1).Rows(cboAOrt.ListIndex + 2).CellsDim Zelle As CellDim Bereich As RangeI = 0If cboAOrt.ListIndex = -1 Then cboAOrt.ListIndex = 0For Each Zelle In ActiveDocument.Tables(1).Rows(cboAOrt.ListIndex + 2).CellsSet Bereich = ActiveDocument.Range(Start:=Zelle.Range.Start, End:=Zelle.Range.End - 1)Select Case ICase 0Nr = 1Zweigstelle = Bereich.TextCase 1Strasse = Bereich.TextCase 2Ort = Bereich.TextCase 3Telefon = Bereich.TextCase 4Telefax = Bereich.TextCase 5Mail = Bereich.TextCase 6Name = Bereich.TextCase 7Titel = Bereich.TextEnd SelectI = I + 1Next ZelleActiveDocument.Close Has anybody