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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,216,507
Messages
6,131,059
Members
449,616
Latest member
PsychoCube

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