Great video by Reza shows the ability to create pdf from screen (works great), but would like to create and have the option to send pdf email to user (clicking on icon). Reza shows on the video how he does it with a Gallery (send pdf to email), but this show for gallery, but i need it for the screen
my code that is not working, and i think because its missing the creation of the PDF from the screen.
Office365Outlook.SendEmailV2(User().Email,"Subject","Body of Email",{Attachements:Table({Name:"PDF Timesheet.pdf",ContentBytes:PDF(myscreen)})})
has anyone figured this out?
or possibly the option to print from the pdf viewer?
Just a follow-up question to this - works perfectly, except the PDF sent looks to be twice the height of the screen (set the screen with its own dimensions). Not sure if this is to do with the background PDF printer scaling options that can't change, or if there is anything that can be changed in PowerApps. Just can't see why this is happening. Thanks
one more (probably dumb question), are we able to bring in fields from the form into the body or subject line?
like the title of the form, rather than "Subject", could we add "Subject" & title or something like that?
unbelievable, works fantastic, that function will be used alot..
thank you Warren
Hi @vandam2 ,
You just missed one step - you need to use the PDF() function to create a temporary Variable to send as the content
With(
{wPDF: PDF(myscreen)},
Office365Outlook.SendEmailV2(
User().Email,
"Subject",
"Body of Email",
{
Attachments:
{
Name: "PDF Timesheet.pdf",
ContentBytes: wPDF
}
}
)
);
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399