I've checked the reference libraries and believe that I am using the correct ones. You can add this test to your code before you try to use the fCust bookmark: If Windows(SourceTemplateName).Document.Bookmarks.Exists("fCust") = False Then MsgBox "You are not using the correct source document. Solutions for holding oscilloscope probes (and freeing up hands) How does Quark attract customers to his bar given that the drinks and food can be gotten free from a replicator? Reply With Quote 09-09-2010,01:54 PM #3 Mifty View Profile View Forum Posts View Blog Entries View Articles VBAX Newbie Joined Sep 2010 Posts 3 Location Originally Posted by fumei If it http://evollux.net/time-error/word-macro-run-time-error-5941.html
Word never ceases to amaze me... Does the script fail, output the wrong info, something else? –emsworth Jan 5 at 17:21 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote The error 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
Below is the code and I've highlighted in red the line where the error occurs. My question is about the error (Run-Time error '5941' "The requested member of the collection does not exist"). Hope This Helps, PH.FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?FAQ181-2886: How can I maximize my chances of getting an answer? Run Time Error 4605 Word 2010 Code: Dim cnt As New ADODB.Connection Dim rst As New ADODB.Recordset Dim strDB As String Set cn = New ADODB.Connection 'Set string path to database' strDB = "C:\users\stacy\documents\my data sources\PEI.accdb" 'Open
Word for fake religious people Cryptic Hour Pyramid! Vba Error 4605 The debug stops at the line (If .Bookmarks("href" & i + 1).Range = ".jpg" Then) I have tried everything I can think of to remedy this but nothing is helping. System.PrivateProfileString("C:\Users\GaleR\Documents\SettingsSerial.txt", "MacroSettings", _ "SerialNumber") = SerialNumber 'Recreate the bookmark ready for the next use. Close this window and log in.
I suppose you mean if you delete the entire block of code that begins with the IF. asked 1 year ago viewed 1664 times active 1 year ago Blog Developers, webmasters, and ninjas: what's in a job title? Run-time Error '5941' Application-defined Or Object-defined Error Click on the macro, then click the button to ADD it to the list on the right. The Requested Member Of The Collection Does Not Exist Word 2013 Output the sign Are the mountains surrounding Mordor natural?
Text caption constricted to table width Was George Lucas involved with Rogue One? navigate here Default = "1" ' Display message, title, and default value. Also checked names in DB and Table name although code does not get to table name bit. 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 Run Time Error 5941 Word 2013
May 30 '14 #4 reply Expert 100+ P: 1,205 jimatqsi Not a genius, just experienced in some things. Jim Share this Question 4 Replies Expert 100+ P: 1,205 jimatqsi You sayIf I remove the stated if statement completely then it gives a script out of range.. I'm not skilled in either Word or Access but have used VBA in Excel. Check This Out What is the variable AMOUNT?
Copyright © 2004 - VBA Express Login with LinkedIN Or Log In Locally Email Password Remember Me Forgot Password?Register ENGINEERING.com Eng-Tips Forums Tek-Tips Forums Search Posts Find A Forum Thread Runtime Error 4248 Word 2013 Reply With Quote Quick Navigation Word Help Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Announcements Announcements Introductions VBA Code & Other Help How to Very glad you got that worked.
Post your question and get tips & solutions from a community of 419,092 IT Pros & Developers. You may have to register before you can post: click the register link above to proceed. Join UsClose Register Help Remember Me? Runtime Error 4248 Word 2010 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
ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.1/ Connection to 0.0.0.1 failed. I've checked the bookmarks by using Edit|Go To|Bookmark. Sorry I should have put in comments. this contact form Are you using Option Explicit?
Jim May 30 '14 #2 reply P: 3 johnb76 "Amount" is a textbox on my Userform where I type in the number of textboxes I want. I see that being used a lot but never set. Jim May 30 '14 #5 reply Message Cancel Changes Post your reply Join Now >> Sign in to post your reply or Sign up for a free account. The next step would be to narrow down whether the "missing member" of the collection refers to the template or to the Building Block entry.
Maybe I'm missing something there?? Mifty Reply With Quote 09-10-2010,10:43 AM #5 fumei View Profile View Forum Posts View Blog Entries View Articles VBAX Wizard Joined May 2004 Posts 6,713 Location And use Option Explicit!!!!! You may have to register before you can post: click the register link above to proceed. May 30 '14 #3 reply P: 3 johnb76 jimatqsi you are a genius.
So I am bringing up the blank, going into record Macro and assigning to button and recording then to Quick Parts, selecting the address, Insert, and then back to Home, before what is the difference between `>> /dev/stderr` (with the white space) and `>&2`? Monday, July 11, 2011 9:44 AM Reply | Quote 0 Sign in to vote Hi "Boots" I was going to suggest the same thing as Tony and am as surprised as