In this tutorial I’ll show you how to Merge data into Word documents with custom file names and password protection, create PDF versions, and EMAIL each document as an attachment—ALL AUTOMATICALLY—all with 1 CLICK—all with NO ADDITIONAL SOFTWARE.
Perfect for anyone who needs fast, secure, personalized document generation.
00:00 Introduction
------------------------------------------------------
Demonstration of what you will be able to do
------------------------------------------------------
01:59 Understanding the folders and files that I will use and you can download from the link at the end of the description.
02:45 Seeing the contents of the Excel data source
03:34 Looking at the Merge (master) document
04:35 Running the macro to execute the merge
05:53 Looking at the email sent to the recipient and the attached document they receive
------------------------------------------------------
How YOU can set up the Mail Merge
------------------------------------------------------
07:18 Decide on a good location to store the files (IMPORTANT INFORMATION here)
08:36 Creating the folder structure
10:10 Getting an copying the full path to your folders
11:26 Set up your Data Source
IMPORTANT: all the columns in the data source MUST be included in your data source and ALL the column headings must
be spelt EXACTLY the same and CASE SENSITVE.
12:28 How to modify the data source for your needs.
12:28 The document folders
14:00 The file names
14:59 The email of the recipient
15:24 The password to protect the document
15:53 Adding more columns to the data source which you may want for your mail merge document
16:27 SIX SEVEN
17:25 Creating the letter (merge document)
17:36 Disconnect my data source from the document so that I can attach it to the new data source
18:28 Linking the merge document to the data source
20:16 Check that all link to the data source is successful and how to do some filtering if you want.
21:36 Add merge fields to your document
22:44 How to do a simple merge to documents or merge to email as email or email with attachment
------------------------------------------------------------
How to add the Macro to Word (2 methods demonstrated here)
------------------------------------------------------------
24:08 Enable the Developer tab
24:50 Change the trust center setting
26:14 Adding the Macro to your Word application
I first go through the different folders with the different macros I give you.
28:22 I delete the Macro I have already imported for the demonstration at the beginning.
28:48 Adding Macros to your Word application
29:40 Using the text file to generate the Macro
-31:09 setup to see the new module we have just created running
-31:31 running the new macro
-31:59 checking the sent email
32:56 Using the .bas file to import the macro
33:02 First lets remove the macro we have added using the text file
33:39 Importing the .bas file
------------------------------------------------------------
How to make modifications to the code
------------------------------------------------------------
35:13 How to edit the code
35:49 Modify the confirmation message at the end of the merge
37:54 Modify the email subject and body
40:06 Modify the code so that it does not generate PDF documents
40:55 Modify the document password protection for opening and editing the document
42:37 Identify the field names which witch are linked to the data source incase you want to use different field names
44:16 Running the merge with the modified macro
------------------------------------------------------------
Wrap up and Tips to avoid errors
------------------------------------------------------------
45:47 Different tips that will help you avoid getting errors.
--------------------------
Useful links
--------------------------
Download the files used in this tutorial here:
https://www.dropbox.com/scl/fo/cmbynq...
Link to the mail merge tutorial which produces Word and PDF documents (no password protection or email):
• Mail Merge to separate documents (.docx .p...
Link to a tutorial on setting up a standard mail merge and filtering the data source:
• Mail Merge (Microsoft Word) IGCSE ICT (0417)