Email macro - Attach rows to Email body - Based on entered value

cagni

New Member
Joined
Aug 1, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hi

I have an excel spreadsheet which is used as an ordering sheet. The workbook contains 4-5 sheets with data as the attached image below.

The plan is to have Button on sheet1 and when pressed a macro will copy the rows from each sheet where a value is entered in F column to the email body. Is this even possible to create?

If not I guess I should just make the macro so i creates a pdf of all rows and then send that to the email. Would it then be possible to create the pdf data from different sheets into 1, or should it be several pdfs?

I haven´t started any code yet as I´m not sure which method to go with.

If missing information let me know, and I will answer.

1674209434662.png
 
You can add more text below the table by writing this line:
VBA Code:
wdDoc.Range.InsertAfter "test"
 
Upvote 0
Solution

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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