Hi Gord/RohanSorry I misread your query.. You can try out the belowmacro.
hi Jacob,
this works perfectly.
However I'm wondering if I can repeat this code all the way down a column then paste the photo at the end of this cell?
say the column containing comments with pictures are at C, and I want to paste the extracted pictures in D, and have the macro looping down column C until a black cell?
thanks in advance.
Amy
On Wednesday, September 09, 2009 8:11 AM Rohan wrote:
Hi
I am having one excel file with Comment pictures, now i want to take those
pictures out and past some other location
how can i do this
Rohan
On Wednesday, September 09, 2009 8:26 AM Jacob Skaria wrote:
--Right clickEdit comment Click on the border (so that the cursor is not in
edit mode)
--Right clickFormat comment'Colors and Lines' tabColor 'dropdown'Fill
Effects'Picture' tabselect Picture
If this post helps click Yes
---------------
Jacob Skaria
"Rohan" wrote:
On Wednesday, September 09, 2009 11:47 AM Gord Dibben wrote:
Jacob
That's how you get a picture into a Comment.
OP wants to extract the current picture and move it to another location.
I think some VBA is required here.
Don't have time right now to experiment.
Can you look some more at this?
Gord Dibben MS Excel MVP
On Wednesday, September 09, 2009 1:12 PM Jacob Skaria wrote:
Hi Gord/Rohan
Sorry I misread your query.. You can try out the below macro. If you are new
to macros.. The macro should copy the picture to Range("A1") of the active
sheet itself.
--Set the Security level to low/medium in (Tools|Macro|Security).
--From workbook launch VBE using short-key Alt+F11.
--From menu 'Insert' a module and paste the below code.
--Get back to Workbook. Select the cell with comment and picture
--Run macro from Tools|Macro|Run <selected macro()
Sub Macro1()
Dim rngTemp As Range
Set rngTemp = ActiveCell
Application.ScreenUpdating = False
With ActiveCell
.Comment.Visible = True
.Comment.Shape.Select
.Comment.Shape.CopyPicture _
Appearance:=xlScreen, Format:=xlPicture
.Comment.Visible = False
End With
ActiveSheet.Range("A1").PasteSpecial
Application.ScreenUpdating = True
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Gord Dibben" wrote:
On Wednesday, September 09, 2009 2:00 PM Gord Dibben wrote:
Superb Jacod.
Thanks for following up.
I have saved the macro in my add-in.
Gord
On Wednesday, September 09, 2009 2:12 PM Jacob Skaria wrote:
Thanks Gord for the feedback..It is encouraging..
"Gord Dibben" wrote:
On Thursday, September 10, 2009 3:04 AM Rohan wrote:
Hi Jacob Skaria
wooow its sooo nice this is the answer for me,
Jacob please tel me is there is any way to insted of copying this file to in
excel sheet i want to save this file in a nother folder as a .JPEG??
its great
Rohan
"Jacob Skaria" wrote:
On Monday, September 14, 2009 7:41 AM Jacob Skaria wrote:
Hi Rohan
Thanks for your response and apologies for the delay in response. Use the
below procedure to save as jpg. Try and feedback
Sub Macro()
SaveSelectedPictureAs "c:\1235.jpg", "JPG"
End Sub
Sub SaveSelectedPictureAs(strFile As String, strFormat As String)
Dim wsTemp As Worksheet, chtObj As Chart, pObj As Picture
Dim dblWidth As Double, dblHeight As Double
Set pObj = Selection: dblWidth = pObj.Width: dblHeight = pObj.Height
pObj.Copy
Application.ScreenUpdating = False
Set wsTemp = ActiveSheet: Set chtObj = Charts.Add
chtObj.Location Whe=xlLocationAsObject, Name:=wsTemp.Name
wsTemp.Range("A1").Select
With wsTemp.ChartObjects(1)
.Top = 0
.Left = 0
.Width = dblWidth
.Height = dblHeight
.Activate
.Chart.Paste
.Interior.ColorIndex = 1
.Chart.Export FileName:=strFile, FilterName:=strFormat
.Delete
End With
Application.ScreenUpdating = True
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Rohan" wrote:
On Sunday, October 11, 2009 1:08 PM Rohan wrote:
Hi Jacobs many thanx for your replies and apologies for the delay in response,
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
"Jacob Skaria" wrote:
|