How to add image comments in excel 2007

Source: Internet
Author: User
Tags comments

You can insert an image by setting an annotation style in an excel 2007 annotation. office2003 does not have this function.

Sometimes, in order to create a table with a large amount of information and simplicity, we need to add a hidden image to the cells in the Excel table. When the mouse points to the cell, the image will be automatically displayed, and the picture will not be displayed if it is removed, is the interaction effect cool?

  1. In an Excel table, you can easily interact with related images by pointing to a cell.
    Next, we will take the production product list as an example to show how to add images.

  2. Move the cursor to a cell to automatically display the preset image
    Add a single image
    Right-click the target cell, select "Add annotation", delete all text in the annotation input box, and move the cursor to the edge of the annotation input box. When the pointer turns into a cross arrow, right-click and choose "set annotation format" & rarr; "color and line" & rarr; "fill effect" & rarr; "image ", click "select image" to add an image.
    Now you can point to the target cell to display the image. If you move the mouse away, the image will be automatically hidden. If the image does not disappear automatically when you move the mouse away, click "Office" in the upper-left corner of the Excel window and click "Excel options" in the pop-up menu ", select "advanced" on the left side of the "Excel options" window, select "show only flag on the right side, and add comments when hovering". After confirming, the image will be automatically hidden.

  3. Batch add images
    If you want to add image comments to many cells, it is very troublesome to set them one by one. You can use macros to batch set Image comments.
    First, we need to centralize all the image files we need into a folder (for example, F: product diagram. The image names correspond to the product names in the table format, such as product name .jpg, for example, vx545hd.jpg、 vx757.jpg, etc. In addition, the aspect ratio of all images should be the same, so as to ensure that the images displayed after the unified settings are not distorted.
    Then, open the workbook in Excel2007, press the combination key "Alt + F8" to open the macro window, enter the macro name as "add image annotation", and click "Create, edit the code in the open VBA window.
    Code snippet:
    Sub adds an image annotation () Dim cell On Error Resume Next For Each cell In Selection cell. addComment cell. comment. shape. fill. userPicture "F: product diagram" & cell. value &". jpg "cell. comment. shape. height = Cell 120. comment. shape. width = 200 Next Cell End Sub
    Close the VBA window and save the file as a document in the format of "Excel enable macro Workbook. Now you only need to select all the cells to be set, such as A4: A20, press the combination key "Alt + F8" to open the macro window, double-click "Add image annotation" in the list to run the macro, you can add images to cells in batches.
    (Note: The image is saved in the workbook after being set ). If the product name in the table is changed or the image file used for annotation is changed, you just need to run the "Add image annotation" macro to refresh it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.