Home > Time Error > Word Vba 5941 Error

Word Vba 5941 Error

Contents

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 I've checked and rechecked the file name and name of the dropdown. The time now is 04:15 PM. Which mirror should I pick when downloading Blender? http://pdctoday.com/time-error/word-vba-error-5941.php

Powered by vBulletin Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. Is the Fortran language still being used in aviation? the rest of the code goes here destDocument.Activate Post your code to the Code Review part of SE to get a more detailed review of your working code. The system returned: (22) Invalid argument The remote host or network may be down.

Run Time Error 5941 The Requested Member Of The Collection Does Not Exist

In order to give a macro a different name, simply change what appears after the word "Sub". All rights reserved. Registration on or use of this site constitutes acceptance of our Privacy Policy. 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.

Doug Robbins - Word MVP, dkr[atsymbol]mvps[dot]org Posted via the Community Bridge "Woodabyna" wrote in message news:[email protected]m... I am trying to simply create a series of macros that assistants can use to insert a signature building block into a document. Either way I do it, I'm still receiving the same error. The Requested Member Of The Collection Does Not Exist Word 2013 Unfortunately people equate the two - formfields and bookmarks.

Sunday, July 10, 2011 2:16 PM Reply | Quote 1 Sign in to vote Sounds right. 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 Message = "Enter the number of copies that you want to print" ' Set title. anchor Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next dim all variables as required

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. Runtime Error 4248 This Command Is Not Available Because No Document Is Open 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. 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 I double checked and even changed the file name and dropdown name to make sure that I was using the correct names (see below).

Run Time Error 5941 Word 2013

Put this as the first line in the macro ... his comment is here 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 Run Time Error 5941 The Requested Member Of The Collection Does Not Exist One other bit: Don't save the code into a .docm document, because that will lose the AutoText entries (which can only be stored in templates, not in documents). Run-time Error '5941' Application-defined Or Object-defined Error Sub Macro1() ' ' Macro1 Macro ' ' Templates.LoadBuildingBlocks Application.Templates( _ "C:\Users\Josephine\AppData\Roaming\Microsoft\Document Building Blocks\1033\14\Building Blocks.dotx" _ ).BuildingBlockEntries("HomeAddress").Insert Where:=Selection.Range, _ RichText:=True End Sub Enjoy, Tony www.WordArticles.com Marked

Resources Join | Indeed Jobs | Advertise Copyright © 1998-2016 ENGINEERING.com, Inc. http://pdctoday.com/time-error/word-2010-run-time-error-5941.php Sql Server: A seemingly strange behaviour of BEGIN TRAN - COMMIT How to specify algebraic relations between objects? share|improve this answer answered Jan 5 at 17:19 Cindy Meister 5,63461326 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign I've tried different variations on the code but keep receiving errors. Vba Error 4605

If you want to see a different icon, click on the macro in the list on the right, then click "Modify". I'm in design mode and I click on "Insert a dropdown list content control". That as far as my understanding goes. Get More Info On debug the whole macro is highlighted.

To start viewing messages, select the forum that you want to visit from the selection below. Run Time Error 4605 Word 2010 Are you using Option Explicit? more hot questions question feed lang-vb about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

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?

  1. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.
  2. That's why I'm not giving you the exact menu names - I don't want to confuse you!)Cindy Meister, VSTO/Word MVP Marked as answer by Calvin_GaoModerator Monday, July 18, 2011 6:51 AM
  3. Are 14 and 21 the only "interesting" numbers?
  4. Jay Freedman MS Word MVP Marked as answer by Bessie Zhao Tuesday, July 13, 2010 2:18 AM Wednesday, July 07, 2010 2:10 PM Reply | Quote 0 Sign in to vote
  5. I have Windows 7 64 bit and Word 2010 Office and Student.
  6. Any help would be great.
  7. 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".
  8. 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, _

Sub Macro1() ' ' Macro1 Macro ' ' Templates.LoadBuildingBlocks Application.Templates( _ "C:\Users\Josephine\AppData\Roaming\Microsoft\Document Building Blocks\1033\14\Building Blocks.dotx" _ ).BuildingBlockEntries("HomeAddress").Insert Where:=Selection.Range, _ RichText:=True End Sub Enjoy, Tony www.WordArticles.com Marked Are you aComputer / IT professional?Join Tek-Tips Forums! I have saved as a template (.dotm) and then saved document as a .docm but always get the same error. Runtime Error 4248 Word 2010 Browse other questions tagged vba ms-word word-vba or ask your own question.

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:\---" 'Open the database Will applying twenty year old cow manure hurt my vegetable garden? What is the difference between `filetype plugin indent on` and `filetype indent on`? see here If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.Would you like to participate?