MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Add Image to a Comment

with 171 comments

How you add an image to a comment isn’t exactly what I’d call easy but it is straightforward. One of my students noted that a tip in Microsoft Office Excel 2007 Bible (a truly good book on Excel 2007) didn’t provide the magic to insert an image into a cell comment. Updated this post and provided a new blog post that lets you add an image on Excel 2007, Excel 2010, and Excel 2011 with a VBA User-Defined Function (UDF). UDFs differ from VBA macros and you can find my Excel UDF Tutorial here.

I’d have to say that it did but it didn’t. Basically, the general idea is there but a step of magic requires you to know something else. You need to place your cursor on the highlighted edge of an editable comment before right clicking to launch the context menu. If your cursor is on the text portion of the comment, the context menu operates differently. The Format Comment … menu choice launches a different set of options dependent on your location in an editable comment.

I’ve modified the tip by adding the sentence in blue, with what I think it should say. “You can also display an image inside of a comment. Just make sure you right click on the edge not inside the text box of the comment. Select the Colors and Lines tab in the Format Comment dialog box. Click the Color drop-down list and select Fill Effects. In the Fill Effects dialog box, click the Picture tab and then click the Select Picture Button to specify a graphics file.” – Microsoft Office Excel 2007 Bible, Page 91.

Hoping to help my students and others learn the magic, here are some steps. It’s a shame the best way to do this screen capture is on Apple OS X, but that’s life!

1. Right click on the cell to launch the shortcut menu, like this:

insertcomment1

2. Click on the Insert Comment menu item, which launches the comment with the name of the user. If you only want an image, highlight the user name with the mouse and delete it. The backspace key doesn’t work all the time and I’m not sure why that’s the case on Excel 2007. The backspace key always works on Excel 2008 for cell comments.

insertcomment2

3. The tricky part (maybe if you’re new to Microsoft Office) requires you to place the mouse on the edge of the comment box, over the bar-dot line, and right click the mouse to launch the shortcut menu in Excel 2007. The Mac version requires you to double click the cell to get the active sizing border, and another double click to launch the appropriate shortcut menu. Click the Format Comment … menu item in either Excel 2007 or 2008.

insertcomment3

4. Click on the Colors and Lines tab to see the following dialog.

insertcomment4

5. Click on the simple drop-down for the Color option in Excel 2007. Click on the spinner for the Color option in Excel 2008. Inside the box, click on the Fill Effects … menu item. It launches the broadest scope version of the Fill Effects dialog.

Windows Excel 2007 dialog:

insertcomment5

Mac Excel 2008 dialog:

insertmaccomment5

6. Click the Picture tab. Inside the Picture tab, click the Select Picture … button to find a picture on your disk drive.

insertcomment6

7. Click the Lock picture aspect ratio check box if you’re inserting a small landscape orientation image in Excel 2007. There’s no such option in Excel 2008 (newer product, less features, hmm …). Unfortunately, portrait photos don’t seem to preserve aspect ratios as well in Excel 2007.

insertcomment7

8. Now when you click on the cell, the image is visible. If you need to resize an image, right click on the cell to launch the shortcut menu and click the Edit Comment menu item. You can then resize the display of the image.

insertcomment8

Hope this helps some folks.

Written by maclochlainn

January 29th, 2009 at 12:59 pm

Posted in Uncategorized

171 Responses to 'Add Image to a Comment'

Subscribe to comments with RSS or TrackBack to 'Add Image to a Comment'.

  1. THANK YOU! I have been trying forever to find out why my excel wouldn’t allow me to do this, and it wasn’t until I read your comments in blue. THANK YOU!!!!!

    Patrick

    11 Sep 12 at 11:29 am

  2. Muitooooo Obrigado,estava ficando maluca por nรฃo conseguir inserir a imagem no comentario,voc~e me ajudou muito!!

    Valeuuu Bjuss

    Jรฉssica

    25 Sep 12 at 9:38 am

  3. Fantastic help – I’ve been trying to do this for months. Great work!

    Matt

    29 Sep 12 at 3:11 am

  4. thank you!!!

    mark

    7 Oct 12 at 3:40 pm

  5. Wow! what a great help! Thank you a lot, even our IT personnel couldn’t help me out with this one. Thanks again, great thought and good Karma.

    Sunita

    12 Oct 12 at 8:21 am

  6. Thank you!!!

    Jeeji

    16 Oct 12 at 8:33 am

  7. Thank you for the insert-image part!
    I am still wondering on why MS placed it so very inside. Its almost impossible to reach there via logical thinking!

    Rupali

    18 Nov 12 at 1:15 am

  8. why i dont see the option Fill Effects ?????

    moshy

    30 Dec 12 at 8:38 pm

  9. Moshy, Which version of Excel and where specifically are you clicking in the cell?

    maclochlainn

    31 Dec 12 at 9:30 am

  10. thankx its awesome….

    Paras Bhoot

    3 Feb 13 at 11:21 pm

  11. Actually this is a kludge. Microsoft should provide a method of inserting an image file (any image file) directly into a cell that allows the cell’s formatting capabilities (Autofit, Autosize, etc.) to control the image, which is nothing more than collection of data.

    Good try, but this is not the answer. I think the ball is in Microsoft’s court to provide a real, easy to use, solution. But thanks for the effort to find a work-around.

    John

    8 Feb 13 at 9:57 am

  12. John, Good luck getting them to fix it. ๐Ÿ˜‰

    maclochlainn

    8 Feb 13 at 2:55 pm

  13. that’s nice

    waseem khan

    19 Feb 13 at 5:06 am

  14. Very helpful work around indeed !

    Subrata Sinha

    26 Feb 13 at 9:50 am

  15. I can’t insert a picture in the comment.There’s no other option in formatting comment but only Font. What can I do??

    rhieu

    8 Mar 13 at 8:49 am

  16. The position of the mouse is critical to get the right context modal box.

    maclochlainn

    8 Mar 13 at 10:29 am

  17. Thanks a lot ๐Ÿ™‚

    Ei Mon

    4 Apr 13 at 3:03 am

  18. This is nice to know but doesn’t solve my issue. I am attempting to add a logo to an excel version of a time sheet template. I want the logo to stay there — not flash in an out like a comment does. Is this NOT possible?? How do a i get to be there permanently in the template without recreating the entire thing in CS6?

    Thank you.

    Mitchell7993

    5 Apr 13 at 12:07 pm

  19. Wow!!! Thanks a lot

    Isha

    8 Apr 13 at 4:08 am

  20. Hi,

    I am using Excel 2007, however when I try and format the comment I only get very limited options (I only have a font tab, no colours or lines tab; and I also do not have the options for gradient et cetera.) SO help me out what to do?

    ANUP

    15 Apr 13 at 10:31 am

  21. You have to mouse over the right limit to get the other dialog box.

    maclochlainn

    15 Apr 13 at 5:53 pm

  22. I have a .xls, in which there is already an image in comment. how to get image from this comment?

    Somesh

    18 May 13 at 4:37 am

  23. I have found an API that can insert image in a cell may be it will solve your problem also if you want to try Aspose.Cells.

    fariya

    18 Jul 13 at 3:48 am

  24. great job.
    But I have a question!
    I have more than 3000 records in my excel file(2007 version)and when I tried to run the macro that inserts “image comment” on the records, the excel file bloated very badly.
    I guess excel file saves images somewhere in it, this leads to increase in size of the excel file.
    Is there any way to just link up these images to the host excel cells?
    thanks

    xan

    29 Jul 13 at 2:38 am

  25. Chetan, Not that I know about.

    maclochlainn

    29 Jul 13 at 9:57 am

  26. Thank you so much. Just saved my job! Very helpful indeed. Well done.

    gerinator

    3 Sep 13 at 11:41 am

  27. hi!

    is it possible to look up for a picture, like that of VLOOKUP?

    or any suggestions to what should i do – i want to place a picture (for example, drawing of an apple)next to the cell where “apple” is written.

    thanks a lot!

    gissa

    26 Sep 13 at 2:32 am

  28. Gissa, You can search the text value of the cell and change the text formatting to match the background, which effectively makes the search text invisible.

    maclochlainn

    30 Sep 13 at 11:09 pm

  29. Great post. Is it possible to compress the size of images that are embedded in the comments?

    Michael

    14 Oct 13 at 2:33 am

  30. Michael, Unfortunately, Microsoft doesn’t support any form of compression on these image files.

    maclochlainn

    11 Nov 13 at 2:10 am

  31. thank you

    jilani

    27 Nov 13 at 11:53 pm

  32. Good one

    JassC

    3 Feb 14 at 3:19 am

  33. Have been inserting images into cells (Excel 2013)for comments without any issue. However, I’ve recently tried to open the workbook (3 w/sheets) and after a message that a problem was encountered, the next screen shows the following:
    Removed Part: /xl/drawings/vmlDrawing2.vml part. (Drawing shape)
    Removed Part: /xl/drawings/vmlDrawing3.vml part. (Drawing shape)

    Is there any way around this? or what causes this message?
    I need the files to be opened also by users of earlier version (2003) of Excel.

    Nick

    12 Feb 14 at 6:56 pm

  34. Nick, Try saving it in Excel 97 format, which is a non-XML document type. Let me know if it fixed the problem.

    maclochlainn

    12 Feb 14 at 9:32 pm

  35. Thanks Macca (Aussie slang)
    Message “The following featueres in the workbook are not supported by earlier version of Excel. ….and so on and do forth.
    Bold:
    Minor Loss of fidelity
    A worksheet contains a sort state that uses a sort condition with a custom list. This info. will be lost..
    Options to Copy to new worksheet, continue and cancel
    None saved the images.
    Problem is that when I open the file the red tick in the cells that indicates a comment does not show in the original file anymore.

    Nick

    14 Feb 14 at 1:59 am

  36. GOSH! Thanks ๐Ÿ™‚

    ming

    17 Jun 14 at 7:19 pm

  37. Thanks for the great info. I just read down, I may have missed an answer, but…

    When I share my sheet by email, users say there isnt a picture. IS this because images are linked to local files, or is it because they use an old excel version?

    Shane

    16 Jul 14 at 8:18 am

  38. Shane, yes. They’re linked to a local file. If you share the file you need to place the files in a common and consistent location.

    maclochlainn

    18 Jul 14 at 9:51 am

  39. […] How to delete such pictures? […]

  40. First off, great tutorial. My problem is a bit more advanced. Can u tell me how I can add a picture & text in a comment box. Something like a small headshot of the person & a few details about him (like name, age etc). I can do either one but not both…………. Ur help would be greatly appreciated. Thanks a ton in advance.

    Ronald

    20 Oct 14 at 4:37 pm

  41. Also, I forgot to add. The biggest problem with adding a picture you way u described above is that it does not work in Excel Web App. So, I need a comment box with a photo & a text in it & to work in Excel Web App ๐Ÿ™

    Ronald

    20 Oct 14 at 4:39 pm

  42. Ronald, I haven’t tried that with the Excel Web App, but I’ve a hunch there’s an equivalent way to do it by using URLs.

    maclochlainn

    21 Oct 14 at 12:22 am

  43. Any alternate suggestions would be of great help ๐Ÿ™‚

    Ronald

    23 Oct 14 at 2:52 am

  44. I have created a very large family tree – about 2000+ names. I added comments (write-ups about the person, inserted photographs and now I want the family members spread over 20 countries to see this on the internet. When uploaded on to the website the comments appear grouped together and can be seen on the right of the page. It is difficult to connect the name of the person to the write-up. I am wanting members of the family to see the comments and photos as we see them on the excel screen. But the photos do not appear at all.
    Is it at all possible to do this? Or am I wasting my time.
    A line in advice will be highly appreciated.

    Herbert

    25 Oct 14 at 11:57 am

  45. While working in Excel can I open a file from “cloud” or “1 drive”? If so, please tell me how it is done.

    Herbert

    2 Nov 14 at 10:05 am

  46. Hebert, I think the question is about how you can use Excel in the cloud to perform an Add Image behavior. If that’s the case, I don’t know. If you find a way to do it, please let me know.

    maclochlainn

    12 Nov 14 at 10:20 pm

  47. Herbert, I understand what you want to do now. The best immediate solution is to load everything on to a DVD and distribute the DVD. My understanding is that it doesn’t work on the web but I haven’t tried. My supposition is that it is possible but you need to know how to reference the cloud-based OS. Here’s an example on a Mac OS X system:

    ' Add a presized photo as a comment to an Excel cell, done on Excel 2011 for the cell reference.
    Sub InsertComment()
      Dim commentBox As comment
      ' Any existing comments must be cleared before adding a new one.
      Range("A1").ClearComments
      Set commentBox = Range("A1").AddComment
      With commentBox
        .Text Text:=""
        With .Shape
          .Fill.UserPicture ("Macintosh HD:Users:mclaughlinm:Desktop:WizardChess.png")
          .ScaleHeight 3#, msoFalse, msoScaleFormTopLeft
          .ScaleWidth 2.4, msoFalse, msoScaleFromTopLeft
        End With
        .Visible = False
      End With
    End Sub

    I suspect that you need to use a file reference like this, which is how it works on the Mac OS X system:

    Macintosh HD:Users:mclaughlinm:Desktop:WizardChess.png

    Let me know if it helps.

    maclochlainn

    12 Nov 14 at 10:36 pm

  48. After inserting a picture into a comment, how can I rotate it? Thanks

    Kevin Lidey

    11 Feb 15 at 9:52 am

  49. Kevin, Excel doesn’t provide a means to rotate an image. You would need to write a C# library to rotate the image or store rotated images and write a VBA to switch images.

    maclochlainn

    13 Feb 15 at 9:07 pm

  50. Dear
    How to insert photo in cell in ms excel 2007
    eg.
    RollNo. Student’sphoto
    201 jpg1
    202 jpg2
    using in vlookup formula

    Manoj Kumar

    16 Feb 15 at 9:24 pm

Leave a Reply