首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Power Automate:填充word文档。图像?

Power Automate:填充word文档。图像?
EN

Stack Overflow用户
提问于 2021-07-08 22:07:16
回答 2查看 431关注 0票数 0

我正在为填充word文档的流工作。我有一个填充了多个项目的表格,但我也想根据ID从sharepoint添加附件。问题是我可能每个项目都有多个图像,所以我不知道如何解决这个问题。感谢您的阅读。祝你今天愉快!

EN

回答 2

Stack Overflow用户

发布于 2021-07-12 12:05:46

当您从sharepoint列表项获得附件时,您有一个数组,然后将此数组传递到“填充MS模板”步骤。Populate MS template

单击此图标,您将更改为接收项目数组。Populate MS template items

票数 1
EN

Stack Overflow用户

发布于 2021-07-15 11:42:54

处理这个问题的正确方法相当复杂。如果你有一个带有4个图像占位符的Microsoft Word模板,那么你每次都需要插入4个图像,否则Flow中的Populate Word Template操作将失败。

试试这个:(从内存中)

  • In the Sharepoint site:
  • Place a defaultImage.jpg file in the Site Assets folder
    • 这将是当# of Attachments <>占位符数量为images.

时放入模板的默认图像

  • In Flow:
  • Initialize Variable ( Sharepoint、Array)
  • Initialize Variable ( Number)
  • Get Attachments
  • Apply to each Attachment
    • Increment Variable 1
    • Append to Array Variable varPhotoArray
    • This by Sharepoint( variable

varPhotoArrayvarCounter))会将Sharepoint中可能存在的0到4个附件放入数组varCounter

  • Do until循环之外创建一个新的Apply to each操作
    • Do until varCounter is equal to 4 (或Word Template)
    • Get file content by path中任何最大照片数),并通过1从Site Assets
    • Increment Variable Do until抓取defaultImage.jpg文件H265 H166这将用D67填充图像数组,直到图像数量=Site Assets
    • Increment Variable中占位符图像的数量

  • 从这里,您需要访问varPhotoArray中的位置,并将它们放入模板
  • 中。我记不清具体的语法了,但它的效果类似于variables('varPhotoArray')[0]variables('varPhotoArray')[1]variables('varPhotoArray')[2]等,其中数值是图像在数组中的位置。
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68303228

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档