Forum

Macro to email pdf ...
 
Notifications
Clear all

Macro to email pdf file and add company Icon

25 Posts
3 Users
0 Reactions
336 Views
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Had tried, it works beautiful!

 
Posted : 09/10/2020 12:11 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

You're welcome 🙂

 
Posted : 09/10/2020 12:49 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

So sorry just ask a bit more, in the Macro how to change the font style and font size in the Email body

For example :

 Font style="Arial Italics"

 Font Size =14

 
Posted : 09/10/2020 3:19 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi David,

Replace the .Body lines with these

.htmlbody = "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Dear Staffs,</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Good day!</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Attached please find this monthly Salary details and payment will be arranged at this month end, please keep for reference and income tax record.</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">BR.</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">HR Administrator</p>"

Regards

Phil

 
Posted : 09/10/2020 7:20 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

All in all, millions  thanks to everyone interest in the post in particular, my tribute to Philp Treacy for his  patience, precious time and guidance in this post. 

 
Posted : 09/10/2020 8:15 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

You're welcome David.

 
Posted : 09/10/2020 9:06 pm
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

.htmlbody = "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Dear Staffs,</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Good day!</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">Attached please find this monthly Salary details and payment will be arranged at this month end, please keep for reference and income tax record.</p>"

.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">BR.</p>"
.htmlbody = .htmlbody & "<p style=""font-family:arial;font-style:italic;font-size:14px;"">HR Administrator</p>"

 

Sorry, what is the syntax to replace paragraph tag with line break for the last two lines

Dear Staffs,

Good day!

Attached please find this monthly Salary details and payment will be arranged at this month end, please keep for reference and income tax record.

 

BR.

 

HR Administrator 

 

ie the spacing is too wide

 

 
Posted : 10/10/2020 12:08 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi David,

Change these p tags to span and insert a br tag between the last 2 lines:

.htmlbody = .htmlbody & "<span style=""font-family:arial;font-style:italic;font-size:14px;"">BR.</span><br/>"
.htmlbody = .htmlbody & "<span style=""font-family:arial;font-style:italic;font-size:14px;"">HR Administrator</span>"

Phil

 
Posted : 10/10/2020 12:30 am
(@david_ng)
Posts: 310
Reputable Member
Topic starter
 

Deep Thanks again Philip!!My apology for all the fuss request!

 
Posted : 10/10/2020 1:34 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

🙂

 
Posted : 10/10/2020 2:49 am
Page 2 / 2
Share: