web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / need help with a formula
Power Apps
Answered

need help with a formula

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

i currently have a formula that sends files from my attachmentcontrol to outlook and a formula that captures the screen and sends it to outlook. now i need them to be used with one button so instead of having to press 2 i only need to press one and that the files from my attachment control and the pdf from the screen get put into the same email.

Office365Outlook.SendEmailV2(
"test@mail.com",
"Subject",
"Email Body",
{
Attachments: ForAll(
DataCardValue3.Attachments,
{
Name: Name,
ContentBytes: Value
}
)
}
)

Office365Outlook.SendEmailV2(User().Email,"test","Test1",{Attachments:Table({Name:"Test.pdf",ContentBytes:PDF(Screen4)})})


top one is for attachment control bottom one for pdf.


Categories:
I have the same question (0)
  • Verified answer
    KeithAtherton Profile Picture
    3,709 Most Valuable Professional on at

    Hi @Anonymous,

     

    Try the following code. It may require some trial-and-error:

    // Add all attachments to a collection.
    ClearCollect(colAttachments,
     ForAll(
     DataCardValue3.Attachments,
     {
     Name: Name,
     ContentBytes: Value
     }
     )
    );
    
    Collect(colAttachments,
     Table(
     {
     Name:"Test.pdf",
     ContentBytes:PDF(Screen4)
     }
     )
    );
    
    // Send email, pass all attachments using the collection.
    Office365Outlook.SendEmailV2(
     "test@mail.com",
     "Subject",
     "Email Body",
     {
     Attachments:colAttachments
     }
    );

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Follow me online.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard