Run-time Error '91': Excel 2011 For Mac

  1. Run Time Error 91 Excel 2011 For Macro
  2. Run Time Error 91 Excel 2011 For Mac
  3. Runtime Error '91': Excel 2011 For Mac Mac

Apple Footer. This site contains user submitted content, comments and opinions and is for informational purposes only. Apple may provide or recommend responses as a possible solution based on the information provided; every potential issue may involve several factors not detailed in the conversations captured in an electronic forum and Apple can therefore provide no guarantee as to the efficacy of any proposed solutions on the community forums. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site.

Runtime error

All postings and use of the content on this site are subject to the.

Run-time Error

Run Time Error 91 Excel 2011 For Macro

Hi, I'm hoping for a resolution. I read the instructions and I'm pretty comfortable with Mergefields and have all of my documents all aligned and functioning. My problem is when I went to use the VBA code supplied under 'Merging by Catalog/Director to E-Mail'. I had to manually type into the document because of network security settings and I truly thought I was doing something wrong as I keep getting the below error: So I decided to copy and paste the code from the tutorial into the Email Merge documents including in the zip file on my personal laptop and I received the same error. What am I doing wrong or is their a piece of code that should/shouldn't be included in the code? Below is the code and I bold the line where the debug button leads me to.

Run Time Error 91 Excel 2011 For Mac

Hoping for a resolution. Please and thank you Paul.

The error is telling you that the DocName object doesn't exist (or perhaps more accurately, it exists but it doesn't contain anything). The RunMerge Macro is passing a Document to EmailMergeTableMaker but the value of that document at the time is 'Nothing'. This would be the case if Doc1.MailMerge.State = wdMainAndDataSource. If you step through the code in RunMerge you will discover that the line 'Set Doc2 = ActiveDocument' doesn't get run and therefore when you subsequently 'Call EmailMergeTableMaker(Doc2)' you are passing in an empty document variable instead of a document. The fix is to ensure that the location where this code is placed is a Word document with an attached data source. The error is telling you that the DocName object doesn't exist (or perhaps more accurately, it exists but it doesn't contain anything).

/B.I extracted all the files from the zip and placed them in my Documents folder. The instructions says to copy and paste the code into VBA in the Directory/Catalog file or at least that is how I'm reading it. I'm placing the VBA coded into the file EmailDataSource.doc which contains the catalog data fields. Am I placing the code into the wrong file? Was I suppose to rename that file? Also I agree that Doc2 is set to nothing.

Thank you for explanation. Basically, the problem comes down to not following the instructions in the tutorial closely enough. When followed, the code runs without error.Please help me understand and I'm hoping I got it right.

I have 2 files and the names on my office computer are as follows: EmailMergeDataCatalog.doc Was originally a 'docx' file format but changed it to 'doc'. This contains a table with Mergefields that are in a table format and I've associated the Excel file that it is to pull from. I added the VBA code to this file. Email Merge Main Document.doc This is the formatted text file with my paragraph and the Mergefield called Data. According to the tutorial, as soon as I run the macro, it will also create a file named 'EmailDataSource.doc' and pull data from both of these files. Was I suppose to change anything in the VBA code?

Runtime Error '91': Excel 2011 For Mac Mac

Or did I place it in the correct file? And yes I was thanking you in my initial post. EmailMergeDataCatalog.doc Was originally a 'docx' file format but changed it to 'doc'. This contains a table with Mergefields that are in a table format and I've associated the Excel file that it is to pull from. I added the VBA code to this file.Docx files can't be saved with macros - you'd need to have saved the file in either the docm or doc formats. Also, as noted in the tutorial: The ‘RunMerge’ macro that drives this process (see below) assumes your e mail mailmerge main document will be named ‘Email Merge Main Document’.

If that’s not what you name your document, you’ll need to change the corresponding name in the ‘RunMerge’ macro Did you make that change? Did you save both the 'EmailMergeDataCatalog.doc' and your mailmerge main document to the same folder before running the macro? Yes I changed everything to reflect 'doc' and I also have all of the files in the same folder.

I also kept your naming convention for the file and made sure that it states the same thing in the VBA code. For the life of me I can't figure out why it doesn't want to work. I'm going to write sample files this weekend and upload them here to see if you see anything glaring or if I'm doing something wrong.

I can't post the actual files due to company rules. Thanks for confirming.