Sending a PDF from Excel using email address from the sheet

GabrielleB

New Member
Joined
Jul 14, 2020
Messages
1
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
  2. MacOS
Hi Guys,

I'm currently working on a project and I've become a little stuck, for some reason none of my coding to open Excel and create a PDF appears to be working and I don't know why, and was hoping an excel wizz might help me out.

I'm working on a marking tracker. The email we send is a template that give updates on peoples marks for various modules. Each diploma has its own template, with the modules set out in a specific structure. There are about 50 students, so I figured the best way to sort this into something manageable, is to the the template copied vertically down the sheet multiple times and it takes the information from specific rows into each iteration to fill out the PDF's. Obviously this is very simple and requires no macros.

Then we come to the sending of the email. I need coding that creates a PDF using the template, and sends it using the email address in P3. I also need to input a specific subject line and email body, these can be taken from the sheet if necessary.

I then want to compile one macro on top of another to run in sequence, ie Macro 1, does the template from cells A1:E32, if I3=Diploma, and then next one runs from A32:E63 if I36=Diploma and so on and so forth. That way the information pulls from my other sheet, I can send multiple emails so all of the students at once instead of having to do each student one by one.

An additional step I need is that some students will have two email addresses, so I also need a CC field in the email taken from Q3.

I realise that the step of having multiple macros running one after the next will be rather a slow process to run, so if someone has a better solution, I am happily all ears.

Below is a picture of the screen i'm working with if that helps.

Cheers

Gabrielle

Excel Example.jpeg
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top