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

Notifications

Announcements

No record found.

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)
  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

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

  • Abby Abraham Profile Picture
    314 on at

    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

  • Verified answer
    Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    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.

  • Verified answer
    Abby Abraham Profile Picture
    314 on at

    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

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans