![]() |
Excel comment Picture
Actually my requirement is, in my excel sheet I am having style no and respective picture those pictures are in comment. Now I want to take this picture out with particular style no as the picture name Example Column A Column B 002893 Picture 234455 picture 009944 picture 990494 picture After extracting it should be 002893.jpg 234455.jpg 009944.jpg 990494.jpg |
Excel comment Picture
To extract all Comments pictures and stack them at F1 and rename to list in
A1:A4 run Comment_Extract macro. You could combine the two macros into one...........I'm too lazy this morning. Note: list of names must match the minimum number of pictures. Sub Comment_Extract() Dim cmt As Comment Dim cmts As Comments Set cmts = ActiveSheet.Comments For Each cmt In cmts With cmt .Visible = True .Shape.Select .Shape.CopyPicture _ Appearance:=xlScreen, Format:=xlPicture .Visible = False End With ActiveSheet.Range("F1").PasteSpecial Next Call Rename_Pics End Sub Sub Rename_Pics() Dim Pic As Object Dim rng As Range Dim i As Integer On Error GoTo endit Set rng = Range("A1") ActiveSheet.DrawingObjects.Select For Each Pic In Selection Pic.Name = rng.Offset(i, 0).Value i = i + 1 Next Pic Exit Sub endit: MsgBox "there is a picture by that name, re-type a name" End Sub Gord Dibben MS Excel MVP On Wed, 21 Oct 2009 22:33:01 -0700, Rohan wrote: Actually my requirement is, in my excel sheet I am having style no and respective picture those pictures are in comment. Now I want to take this picture out with particular style no as the picture name Example Column A Column B 002893 Picture 234455 picture 009944 picture 990494 picture After extracting it should be 002893.jpg 234455.jpg 009944.jpg 990494.jpg |
All times are GMT +1. The time now is 05:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com