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 Automate / Can not Insert a Graph...
Power Automate
Answered

Can not Insert a Graph file into Word Bookmark in Text Box

(0) ShareShare
ReportReport
Posted on by 8

I use Power Automate Desktop to Insert Text and JPG file  to Word Document.
When I insert a text to word bookmark in a Text Box, it works; But I insert a JPG file to word bookmark in a Text Box, it dosen't work, and will Insert this JPG file to the head position place of Word file.

Have anyone knows why? 

Word.LaunchWord.LaunchAndOpen Path: $'''Z:\\mytest.docx''' Visible: True ReadOnly: False Instance=> mytestfile
Word.WriteToWord.WriteEndOfBookmark Instance: mytestfile Text: $'''test text''' AppendNewLine: False Bookmark: $'''TextBookmark'''
Word.InsertImageToWord.InsertImageBookmarkStartFromFile Instance: mytestfile Bookmark: $'''JPGBookmark''' Path: $'''Z:\\jpgfile.jpg'''

  • Verified answer
    kinuasa Profile Picture
    803 Most Valuable Professional on at

    I think there might be a bug. Instead, how about using the "Run VBScript" action to execute a script like the one below?

     

    GetObject("%WordDocumentPath%").Bookmarks("%BookmarkName%").Range.InlineShapes.AddPicture "%ImagePath%", False, True

     

    PAD_InsertImageToWord_01.jpg

    PAD_InsertImageToWord_02.jpg

    The following is a copied desktop flow:

    SET WordDocumentPath TO $'''C:\\Test\\Word\\mytest.docx'''
    SET ImagePath TO $'''C:\\Test\\JPEG\\jpgfile.jpg'''
    SET BookmarkName TO $'''JPGBookmark'''
    Word.LaunchWord.LaunchAndOpen Path: WordDocumentPath Visible: True ReadOnly: False Instance=> WordInstance
    @@copilotGeneratedAction: 'False'
    Scripting.RunVBScript.RunVBScript VBScriptCode: $'''GetObject(\"%WordDocumentPath%\").Bookmarks(\"%BookmarkName%\").Range.InlineShapes.AddPicture \"%ImagePath%\", False, True''' ScriptOutput=> VBScriptOutput

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    Hi @tiencn,

     

    Change your textbox layout options into "Behind Text" as highlighted below and see it resolves your issue.

    For me its working fine, after I made the suggested changes.

    Deenuji_0-1712036624950.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

  • tiencn Profile Picture
    8 on at

    Hi Deenuji
    I have tried your suggestion, but still the same, it dose't work.

    If yours work, maybe our environment  is different. I use Tradionnal Chinese Windows, Word365 and PAD.
    Thanks you anyway.

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 430

#2
11manish Profile Picture

11manish 341 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 282

Last 30 days Overall leaderboard