1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

macro to sharpen all images in word

Discussion in 'Business Applications' started by garyofcourse, Aug 1, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. garyofcourse

    garyofcourse Thread Starter

    Joined:
    Aug 1, 2011
    Messages:
    3
    Hi, I have a 500+ page document with a lot of images. I need to convert all of these to grayscale and to increase sharpness by 40%. Both of these tasks can be done by right clicking each image and choosing 'format picture'. However because there are so many images I wish to use a macro. I am using word 2010.

    I am able to convert all images to grayscale. However I am not able to sharpen them since I do not know the required command/keyword. The macro recorder does not record anything you do int the 'format picture' dialog box so it is of no help. Do any of you know the command?

    Here is my working code so far that converts all images to grayscale.


    Sub Macro1()
    '
    ' Macro1 Macro
    '
    '
    Dim Pic As InlineShape
    For Each Pic In ActiveDocument.InlineShapes
    Pic.PictureFormat.ColorType = msoPictureGrayscale
    Next
    End Sub

    Thanks for any help you can give.

    Gary
     
  2. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,189
    Most imaging apps can do this as a batch process. I am sure Gimp does something like this and is free.
     
  3. garyofcourse

    garyofcourse Thread Starter

    Joined:
    Aug 1, 2011
    Messages:
    3
    Rockn, the point is not to extract all the images, put them in an imaging app, and then bring them back to word. Microsoft word already does this.. right click on image > format picture ... you can go to 'sharpen and soften' and use the slider.

    The point is to do all the images within the word document all at once rather than me doing each in turn... hence the need for a macro
     
  4. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,189
    I was thinking prior to putting them into word. Unless you are not the author of the document of course.
     
  5. garyofcourse

    garyofcourse Thread Starter

    Joined:
    Aug 1, 2011
    Messages:
    3
    Rockn, I am the author of the document, and all the pictures are mine too. All images are already inserted into the document over the last 2 years. However removing and replacing images in a document that size causes formatting to get messed up and will be a big headache. Since no macro solution has been found I will just right click each of them and format the properties individually at this point.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1010242