Hi everybody,
I want to merge multiple PPTS files into one presentation. The solution posted in https://powerusers.microsoft.com/t5/Building-Flows/Merge-PowerPoint-slides/m-p/388163#M43991 works for me, but I want a little bit more.
Does anybody know how to do any of this?
Thanks a lot in advance!
Solved! Go to Solution.
I hope you know bases of programming and creating api otherwise it can be hard ๐ If you will have more questions I will try to send you my example of azure functions to copy paste and try to mimic that.
2nd script: https://medium.com/@cloudmersive/how-to-merge-two-powerpoint-pptx-files-together-in-python-10b6609d6...
3rd azure functions full tutorial: https://docs.microsoft.com/en-us/azure/developer/python/tutorial-vs-code-serverless-python-01
If my post was helpful don't forget about kudos and marking as solution ๐
Hello,
Unfortunately, there is no native or OOB way to merge specific slides from one PPT to another. You can post this as an idea in the forum below:
https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas
You need to create test account on the azure (free for 12 months) and create own connector on azure functions. Use ready python script.
Hi @KamilAdamczyk,
thanks a lot for your reply.
Can you guide me a little bit on what I have to do? That would be great!
I hope you know bases of programming and creating api otherwise it can be hard ๐ If you will have more questions I will try to send you my example of azure functions to copy paste and try to mimic that.
2nd script: https://medium.com/@cloudmersive/how-to-merge-two-powerpoint-pptx-files-together-in-python-10b6609d6...
3rd azure functions full tutorial: https://docs.microsoft.com/en-us/azure/developer/python/tutorial-vs-code-serverless-python-01
If my post was helpful don't forget about kudos and marking as solution ๐
Thanks, that looks great!
I think I'll be able to create an Azure Function that splits PPTX Files now!
But one more question: is there a way to include this in my MS Flow then? Or do I have to build my complete solution in Azure Functions?
Then you need to create custom connector or use it as http request. I prefer 1st option.
one advice. Dont use application json content type to recieve data. Look at my function for merging pdf for PyPDF4 python library
import logging
import azure.functions as func
from PyPDF4 import PdfFileMerger
import io
import base64
import json
import pdfrw
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
try:
req_body = req.get_json()
except ValueError:
pass
pdf1 = req_body.get('pdf1')
pdf2 = req_body.get('pdf2')
if pdf1 and pdf2:
input1 = io.BytesIO(base64.b64decode(pdf1))
input2 = io.BytesIO(base64.b64decode(pdf2))
input1.seek(0)
input2.seek(0)
output = io.BytesIO()
merger = PdfFileMerger(output)
merger.append(input1)
merger.append(input2)
merger.write(output)
merger.close()
output.seek(0)
print("Successfully merged")
return func.HttpResponse(output.getvalue(),
headers={'Content-Type':'application/pdf'}
)
else:
return func.HttpResponse(
json.dumps({
'status': 'error',
'content': 'Unable to parse pdf1 and pdf2'
}),
mimetype="application/json",
status_code=400
)
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
45 | |
40 | |
40 | |
40 | |
32 |
User | Count |
---|---|
86 | |
85 | |
57 | |
50 | |
41 |