Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Take picture out from excel comment

Hi All,

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Take picture out from excel comment

I provided a reply and code to do this a few days ago when you first posted.

Did you not see that reply?

Here is reply again.........................

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, 28 Oct 2009 22:19:01 -0700, Rohan
wrote:

Hi All,

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel comment Picture Rohan Excel Discussion (Misc queries) 1 October 22nd 09 04:52 PM
MS Excel Comment picture Rohan Excel Discussion (Misc queries) 1 October 15th 09 05:32 PM
Excel, how do I set up default comment containing picture? pjk@boro Excel Discussion (Misc queries) 10 March 5th 07 04:03 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
How do I insert a picture within an Excel comment box? Roy White Excel Discussion (Misc queries) 1 September 23rd 05 01:35 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"