Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro to insert pictures in comments

Dear Experts,
I got a Excel macro to paste pictures in Excel cell comments. It is working fine. Now, I need a change in it. Pictures should be rotated 270 degree & then pasted in cell comments. Can anybody help, please? Thanks in advance. code is mentioned below:-

Sub InsertPictures()
Dim cll As Range
Dim Rng As Range
Dim strPath As String
strPath = "D:\Photo Folder"
With Sheets("Sheet1")
Set Rng = Range("A2:A416")
End With
For Each cll In Rng
If Dir$(strPath & "\" & cll.Value & ".jpg") < "" Then
With cll
.ClearComments
.AddComment ("")
.Comment.Shape.Fill.UserPicture (strPath & "\" & cll.Value & ".jpg")
.Comment.Shape.Height = 160
.Comment.Shape.Width = 120
.Comment.Shape.LockAspectRatio = msoTrue
End With
End If
Next cll
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Macro to insert pictures in comments

Dear Experts,
I got a Excel macro to paste pictures in Excel cell comments. It is
working fine. Now, I need a change in it. Pictures should be rotated
270 degree & then pasted in cell comments. Can anybody help, please?
Thanks in advance. code is mentioned below:-

Sub InsertPictures()
Dim cll As Range
Dim Rng As Range
Dim strPath As String
strPath = "D:\Photo Folder"
With Sheets("Sheet1")
Set Rng = Range("A2:A416")
End With
For Each cll In Rng
If Dir$(strPath & "\" & cll.Value & ".jpg") < "" Then
With cll
.ClearComments
.AddComment ("")
.Comment.Shape.Fill.UserPicture (strPath & "\" &
cll.Value & ".jpg") .Comment.Shape.Height = 160
.Comment.Shape.Width = 120
.Comment.Shape.LockAspectRatio = msoTrue
End With
End If
Next cll
End Sub


Clearly you did not use the Object Browser to see if a 'Rotation'
property exists, did you?

Why not...

.Comment.Shape.Rotation = 0.00

...where '0.00' represents the +/- degrees of rotation.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro to insert pictures in comments

Surely I already tried it and got Run Time Error '70': Permission Denied. I think rotation is not allowed for picture in cell comments. Picture needs to be rotated in temporary place or memory and then then pasted in cell comments. Thanks for your attention.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Macro to insert pictures in comments

Picture needs to be rotated in temporary place or memory and then
then pasted in cell comments.


This is what I suspected, anyway, and so thanks for confirming...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro to insert pictures in comments

On Sunday, 14 December 2014 07:21:29 UTC+3, GS wrote:
Picture needs to be rotated in temporary place or memory and then
then pasted in cell comments.


This is what I suspected, anyway, and so thanks for confirming...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Kindly help me to resolve this matter. I have lot of pictures & their manual rotation is a tremendous work. Thanks for your support in advance.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Macro to insert pictures in comments

On Sunday, 14 December 2014 07:21:29 UTC+3, GS wrote:
Picture needs to be rotated in temporary place or memory and then
then pasted in cell comments.


This is what I suspected, anyway, and so thanks for confirming...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Kindly help me to resolve this matter. I have lot of pictures & their
manual rotation is a tremendous work. Thanks for your support in
advance.


I use Office Picture Manager to manipulate any images I use that don't
require special treatment such as I would do in Paint Shop Pro or Robo
Screen Capture. OPM will allow you to multiselect images for most user
actions, meaning you could likely select groups of image files and
rotate them all at once, but I've done performed that action and so
can't confirm this ability!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro to insert pictures in comments

Dear Mr. Garry,

I agree with you that photo softwares can rotate images. I have +600 picture which need to be rotated before pasting in cell comments. Surely excel vba will help in rotating imagines. Experts like you know it well. Kindly spare sometime to resolve my task with VBA macro. Thanks

On Sunday, 14 December 2014 21:29:32 UTC+3, GS wrote:
On Sunday, 14 December 2014 07:21:29 UTC+3, GS wrote:
Picture needs to be rotated in temporary place or memory and then
then pasted in cell comments.

This is what I suspected, anyway, and so thanks for confirming...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Kindly help me to resolve this matter. I have lot of pictures & their
manual rotation is a tremendous work. Thanks for your support in
advance.


I use Office Picture Manager to manipulate any images I use that don't
require special treatment such as I would do in Paint Shop Pro or Robo
Screen Capture. OPM will allow you to multiselect images for most user
actions, meaning you could likely select groups of image files and
rotate them all at once, but I've done performed that action and so
can't confirm this ability!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Macro to insert pictures in comments

I agree with you that photo softwares can rotate images. I have +600
picture which need to be rotated before pasting in cell comments.
Surely excel vba will help in rotating imagines. Experts like you
know it well. Kindly spare sometime to resolve my task with VBA
macro. Thanks


Like I said.., I use Office Picture Manager for this because it's the
easiest way IMO when dealing with multiple images. If I had a VB[A]
solution that works I'd share it with you! Perhaps someone else here
has something to offer because I don't have the energy/time to *spend*
on this. (I have Lou Gehrig's and demands on my time/energy are maxed
out right now, ..sorry!)

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,514
Default Macro to insert pictures in comments

I googled...

VB6 rotate image

...and got 364,000 results! I clicked on this link to find it contains
the code you need to do this via VB[A]...

http://support.microsoft.com/kb/186260

...and so now you'll see why I found it easier to use OPM!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Macro to insert pictures in comments

Thanks for it.

On Monday, 15 December 2014 18:43:55 UTC+3, GS wrote:
I googled...

VB6 rotate image

..and got 364,000 results! I clicked on this link to find it contains
the code you need to do this via VB[A]...

http://support.microsoft.com/kb/186260

..and so now you'll see why I found it easier to use OPM!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
printing comments with pictures SHARON Excel Discussion (Misc queries) 1 January 8th 10 12:22 PM
Macro to insert repeat comments claraloupot Excel Programming 2 May 7th 08 06:54 PM
Comments and Pictures Sean[_15_] Excel Programming 2 August 24th 06 05:02 PM
macro to insert comments? darkwood Excel Discussion (Misc queries) 5 January 31st 06 08:00 PM
batch insert pictures one time in excel macro robin Excel Programming 1 June 16th 04 03:52 PM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"