Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-08-2017, 11:22 AM
texas1014 texas1014 is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Mar 2017
Posts: 2
texas1014 is on a distinguished road
Default mail merge error in vba

Good Morning,



I posted this in the Mail Merge thread as well.

I recorded a macro where I did a mail merge and it worked perfectly while in recording mode. When I executed it, it wouldn't work. I get the following error when it gets to the .Execute Pause:= False line of code:

Word cannot merge documents that can be distributed by mail or fax without a valid mail address. Choose the Setup button to select a mail address data field.

Where is the setup button? Why won't this work when running the macro, but when I recorded the steps, it worked fine?

Thanks,
Tex
Reply With Quote
  #2  
Old 03-08-2017, 02:34 PM
dwirony dwirony is offline Windows 7 64bit Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 50
dwirony will become famous soon enough
Default

Can you post the code from the macro you recorded?
Reply With Quote
  #3  
Old 03-08-2017, 03:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,367
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by texas1014 View Post
I posted this in the Mail Merge thread as well.
I have closed that thread.
Quote:
Originally Posted by texas1014 View Post
I recorded a macro where I did a mail merge and it worked perfectly while in recording mode. When I executed it, it wouldn't work. ... Why won't this work when running the macro, but when I recorded the steps, it worked fine?
Without seeing your code and knowing precisely what you were trying to record, I can only suggest the reason is that the macro recorder hasn't actually recorded all the steps; that's a known limitation of the macro recorder.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
mail merge help, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba error when trying to do a mail merge texas1014 Mail Merge 1 03-08-2017 03:23 PM
Mail Merge Number Error Tamarrissa Mail Merge 2 11-09-2012 09:01 AM
Error 5631 in Mail Merge DoctorNadir Mail Merge 7 12-16-2011 04:38 PM
Mail Merge error message rec Mail Merge 1 04-29-2011 10:30 PM
Mail merge error? SRE Outlook 0 01-11-2010 05:54 PM


All times are GMT -7. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft