Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2018, 02:33 AM
Btop Btop is offline Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Windows 10 Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Office 2016
Novice
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs
 
Join Date: Feb 2018
Posts: 17
Btop is on a distinguished road
Red face

Thanks Paul. In order to have the files saved with a particular name, do I need to edit the line:



Code:
StrName = .DataFields("Contact1")
Or the lines

Code:
.SaveAs FileName:=StrFolder & StrName & ".docx", FileFormat:=wdFormatXMLDocument, AddToRecentFiles:=False
      ' and/or:
      .SaveAs FileName:=StrFolder & StrName & ".pdf", FileFormat:=wdFormatPDF, AddToRecentFiles:=False
      .Close SaveChanges:=False
Thanks and sorry my ignorance
Reply With Quote
  #2  
Old 02-19-2018, 02:52 AM
macropod's Avatar
macropod macropod is offline Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Windows 7 64bit Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,384
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Btop View Post
In order to have the files saved with a particular name, ...
That's already taken care of, via:
Code:
StrName = "Letter1 - " & Trim(StrName)
and:
Code:
.SaveAs FileName:=StrFolder & StrName(StrName)
plus the relevant .docx/.pdf extension.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-21-2018, 02:31 AM
Btop Btop is offline Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Windows 10 Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Office 2016
Novice
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs
 
Join Date: Feb 2018
Posts: 17
Btop is on a distinguished road
Default

I'm getting error 5941 with this line:

Code:
 If Trim(.DataFields("Contact1")) = "" Then Exit For
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Mail Merge to create specific number of table rows flackend Mail Merge 4 12-01-2023 02:49 PM
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Mail merge at large table with variable number of rows blar Mail Merge 1 10-19-2015 03:04 PM
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Mail merge into table with two colums and several rows kathriiin Mail Merge 3 03-30-2015 07:06 AM
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Mail Merge To Individual PDF Files iamrickdeans Mail Merge 1 01-15-2014 12:46 AM
Compatibility of 2 macros in mail merge: Delete table rows + save individual PDFs Grouping table rows to prevent individual rows from breaking across pages dennist77 Word 1 10-29-2013 11:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft