Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
donna donna is offline
external usenet poster
 
Posts: 109
Default Can I create a macro to crop a picture?

I routinely paste print screens into word. I then crop them so I can enlarge
to easily read. I would like to have a macro to eliminate several key
strokes.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Can I create a macro to crop a picture?

Hi Donna,

Here's a macro to crop a given amount of each side of a picture and then zoom in by the amount cropped.

Sub Demo()
Dim sngHeight, sngWidth, sngCrop As Single
sngCrop = 0.1
With Selection.InlineShapes(1)
sngHeight = .Height
sngWidth = .Width
With .PictureFormat
.CropLeft = sngWidth * sngCrop
.CropRight = sngWidth * sngCrop
.CropTop = sngHeight * sngCrop
.CropBottom = sngHeight * sngCrop
End With
.Height = .Height * 1 / (1 - sngCrop * 2)
.Width = .Width * 1 / (1 - sngCrop * 2)
End With
End Sub

As coded, the macro crops 10%. from each side. Change the sngCrop = 0.1 value to suit your requirements.

--
Cheers
macropod
[Microsoft MVP - Word]


"Donna" wrote in message ...
I routinely paste print screens into word. I then crop them so I can enlarge
to easily read. I would like to have a macro to eliminate several key
strokes.

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Can I create a macro to crop a picture?


Hi Donna,

Here's a macro to crop a given amount of each side of a picture and then zoom in by the amount cropped.

Sub Demo()
Dim sngHeight, sngWidth, sngCrop As Single
sngCrop = 0.1
With Selection.InlineShapes(1)
sngHeight = .Height
sngWidth = .Width
With .PictureFormat
.CropLeft = sngWidth * sngCrop
.CropRight = sngWidth * sngCrop
.CropTop = sngHeight * sngCrop
.CropBottom = sngHeight * sngCrop
End With
.Height = .Height * 1 / (1 - sngCrop * 2)
.Width = .Width * 1 / (1 - sngCrop * 2)
End With
End Sub

As coded, the macro crops 10%. from each side. Change the sngCrop = 0.1 value to suit your requirements.

--
Cheers
macropod
[Microsoft MVP - Word]


"Donna" wrote in message ...
I routinely paste print screens into word. I then crop them so I can enlarge
to easily read. I would like to have a macro to eliminate several key
strokes.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a pdf from Word with bleed and crop marks? Aurora Microsoft Word Help 6 May 3rd 23 08:49 AM
Spell Check a protected Form with a Macro & already have forms picture macro [email protected] Microsoft Word Help 2 October 25th 07 04:11 PM
Crop or Size Picture by "Nudging" Kral Microsoft Word Help 1 July 31st 07 05:07 PM
Why can't I crop or frame my selected picture Mel in the USA! Microsoft Word Help 1 May 5th 05 04:12 PM
how to crop a picture & save the changes so i save space? opac Microsoft Word Help 0 March 5th 05 11:25 PM


All times are GMT +1. The time now is 11:34 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"