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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Insert an image as a comment in an Excel cell

(0) ShareShare
ReportReport
Posted on by 314

Does anyone know how to insert an image as a comment in an Excel cell?

I can add a text as a comment by using sysExcelCell.addcomment("Comment here") but it does not seem to support adding images as comments.

Thanks for your help.

Abby

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Abby Abraham Profile Picture
    314 on at
    RE: Insert an image as a comment in an Excel cell

    Got it working.

    Here is the code I wrote

    COM comment;

    COM shape;

    COM line;

    COM userpic;

    comment = sysExcelWorksheetBackOrder.cells().item(1,5).addComment("").comObject();

                shapes = comment.shape();

                line = Shapes.fill();

                userpic = line.UserPicture("C:\temp\pic.jpg");

    Thank you

  • Verified answer
    Martin Dráb Profile Picture
    235,928 Most Valuable Professional on at
    RE: Insert an image as a comment in an Excel cell

    Okay, I just don't know how to do it in Excel.

    I suggest you follow a C# implementation, like this one. It creates a comment with empty text and then accesses its Shape property.

  • Abby Abraham Profile Picture
    314 on at
    RE: Insert an image as a comment in an Excel cell

    Yes it does on Excel itself and

    also C# code below

    For Each cell In Selection

    pic = "C:\pic.jpg"

    With cell.AddComment

                 .Shape.Fill.UserPicture pic

    End With

  • Martin Dráb Profile Picture
    235,928 Most Valuable Professional on at
    RE: Insert an image as a comment in an Excel cell

    Does Excel support images in comments at all? I'm not aware of it.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Syed Haris Shah Profile Picture

Syed Haris Shah 9

#2
Mea_ Profile Picture

Mea_ 4

#3
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans