> Time Error
> Microsoft Word Run Time Error 5941
Microsoft Word Run Time Error 5941
Frozen Jack: Actor or Prop? BernRI replied Dec 9, 2013 Thanks for the help but it still gives me an error but now on the revised Documents("Kit Label Framework.docx").Open it gives me a run-time error 438 Michael S. Top White Papers and Webcasts Popular 5 Best Practices for Business Intelligence Related Evolution of End User Computing--Evolving to Better Meet ... 3 Essential Components for a Strong Enduser Security ... have a peek here
Until then I'd been in a total fog. Am I inserting this in the correct place, ie after the quotation marks, leaving the rest exactly the same? Saturday, July 09, 2011 11:13 AM Reply | Quote Answers 1 Sign in to vote Sounds right. Toolbox.com is not affiliated with or endorsed by any company listed at this site. look at this site
Run Time Error 4605 Word 2013
Hi Gerry, I now have to admit to being very dense I had thought that the bk in the code was identifying the bookmark Obviously not - it was part of Are you using Option Explicit? The time now is 10:30 AM. Are you using Option Explicit?
Checked that numbers in doc map to Numbers in DB The Locals window shows Me Type ThisDocument/Document vRecordset Nothing VDept Value "" Type String I don't know enough to know whether Advanced Search VBForums Visual Basic Office Development [RESOLVED] Runtme Error 5941 If this is your first visit, be sure to check out the FAQ by clicking the link above. How to block Hot Network Questions in the sidebar of Stack Exchange network? The Requested Member Of The Collection Does Not Exist Word 2013 Monday, July 11, 2011 11:43 AM Reply | Quote 0 Sign in to vote Hi "Boots" I'm amazed that just pulling the stuff apart worked.
Browse other questions tagged vba ms-word word-vba or ask your own question. Run-time Error '5941' Application-defined Or Object-defined Error In what spot would the new Star Wars movie "Rogue One" go in the Machete Order? Word never ceases to amaze me... Formfields have bookmarks.
Can't harvest/forage bushes A word or phrase for a fake doctors or healers What's the right answer to "Check, Savings or Credit" for an overseas card in Australia? Runtime Error 4248 Word 2013 To open a window for a document that is not visible, use the Document.Windows.NewWindow method. vDeptCode = ActiveDocument.FormFields("bkDeptCode").Result BTW: do you see ANYTHING about a bookmark in that? To start viewing messages, select the forum that you want to visit from the selection below.
Run-time Error '5941' Application-defined Or Object-defined Error
Below is the code and I've highlighted in red the line where the error occurs. http://opinfos.com/time-error/ms-visual-basic-run-time-error-5941.html Reply With Quote Quick Navigation Office Development Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums Visual Basic Visual Basic .NET VB.net CodeBank Visual Basic 6 i tested your code without error, so i can only assume that the active document does not contain a dropdown named dropdown1 try documents("templte1").activate or better With Documents("template1").FormFields("Dropdown1").DropDown.ListEntries i do my Try something like this and tell us which line gets highlighted: Sub Macro1() Dim tmpl as Word.Template Application.Templates.LoadBuildingBlocks Set tmpl = Application.Templates( _ "C:\Users\Josephine\AppData\Roaming\Microsoft\Document Building Blocks\1033\14\Building Blocks.dotx") tmpl.BuildingBlockEntries("HomeAddress").Insert Where:=Selection.Range, _ RichText:=True Runtime Error 4248 This Command Is Not Available Because No Document Is Open
Michael S. Here is my code Sub KitLabels() ' ' KitLabels Macro ' Macro recorded 9/28/2009 by MVP ' ActiveDocument.MailMerge.DataSource.QueryString = _ "SELECT * FROM `'Credit Card Data$'` WHERE `Kit 1` = '12/15/13' Also checked names in DB and Table name although code does not get to table name bit. Check This Out 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.
I've checked the reference libraries and believe that I am using the correct ones. Runtime Error 4248 Word 2010 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. Home | Invite Peers | More Visual Basic Groups Your account is ready.
I have a different issue now so I will mark this as resolved and put out a new post.
asked 1 year ago viewed 1661 times active 1 year ago Blog Stack Overflow Podcast #97 - Where did you get that hat?! Templates.LoadBuildingBlocks Enjoy, Tony www.WordArticles.com Sunday, July 10, 2011 1:38 PM Reply | Quote 0 Sign in to vote Have tried this but get syntax error. All product names are trademarks of their respective companies. Run Time Error 5941 Word 2013 Close Box Join Tek-Tips Today!
I'm running Word & Access 2007, and VBA 6.5. Join this group Popular White Paper On This Topic Best Practices for a BI and Analytics Strategy 5Replies Best Answer 0 Mark this reply as the best answer?(Choose carefully, this can't more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed this contact form I'll have a better look - thanks Reply With Quote 09-10-2010,03:30 AM #4 Mifty View Profile View Forum Posts View Blog Entries View Articles VBAX Newbie Joined Sep 2010 Posts 3
In order to give a macro a different name, simply change what appears after the word "Sub". Choose "More commands..." This should open the File/Options dialog box at the correct "tab".From the dropdown list at the top left choose "Macros". Stops at [FONT=Arial]vDeptCode = ActiveDocument.FormFields("bkDeptCode").Result[/FONT] Formatting tags added by mark007 . Michael Meyers-Jouan replied Dec 8, 2013 You are using the Windows class, which represents the set of windows that Word has open.
Meyers-Jouan Top This thread has been closed due to inactivity. An Array of Challenges #1: Alternating Arrays How to make sure that you get off at the correct bus stop in Thailand? Either way I do it, I'm still receiving the same error. Output integers in negative order, increase the maximum integer everytime How can I make my work available to the community, when it is in conference proceedings that are not online and
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. I now have a little house icon with HomeAddress macro on the Quick Access bar which is exactly what I have wanted for ages. Dim sourceDocument As Document Dim destDocument As Document Set sourceDocument = ActiveDocument If sourceDocument.Bookmarks.Exists("fCust") = False Then MsgBox "You are not using the correct source document. Not the answer you're looking for?
If you want to see a different icon, click on the macro in the list on the right, then click "Modify". If you want to see a different icon, click on the macro in the list on the right, then click "Modify". Failed to find the 'fCust' bookmark in " & sourceDocument.Name Exit Sub End If Set destDocument = Documents.Open (FileName:= _ "\\SERVERSHARE\HCD\HCD General\Templates\Heavy Cranes ICO Booking Form.docx", _ ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ Resources Join | Indeed Jobs | Advertise Copyright © 1998-2016 ENGINEERING.com, Inc.
That will activate the document (as long as it has been opened as a file, whether or not it has also been assigned to a window). Hope you can find what I am obviously missing! The 2nd docx file with the data could not be loaded.So I opened the docx file with the data, whit a 2nd macro and it works.CODEDim path As String Application.ScreenUpdating = It might be a clue that when I start with the blank document and create the macro, this then works with that open document.
So let's break the recorded macro down into smaller pieces and see exactly where the problem is coming from.