Results 1 to 9 of 9
  1. #1
    Lounger
    Join Date
    Feb 2002
    Location
    Summerville, South Carolina, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Picture formating/moving (Word 2000)

    Using Word 2K SR1. I'm trying to record a template that will move a selected photo to the right side of the page and resize the photo so I can add text to the left of the photo. However, when I try to record the macro and select Format>Picture>Layout tab, all of the options are "greyed out". The macro worked find in Word 97 but not in Word 2K. Am I missing something. Shouldn't this capability be available when recording macros?

    Thanks for any help/suggestions.

    Bill Blazer

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 28 Times in 27 Posts

    Re: Picture formating/moving (Word 2000)

    Forgive me an obvious question:

    If you try to access Format>Picture>Layout in Word 2K, while not recording a macro, are the options grayed out as well? - in which case it may be that a different method is used in Word 2K for doing this operation than in Word 97.

    If you've already tried this, then on to the next attempt.....

    Gary

  3. #3
    Lounger
    Join Date
    Feb 2002
    Location
    Summerville, South Carolina, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture formating/moving (Word 2000)

    Nope, when not recording a macro, the series of keystroke/options work just like they are supposed to and I can insert a photo, reposition it and resize it. But, turn that macro recorder on and the Layout options are no longer available. Think I forgot to mention earlier that I'm running XP Home edition also.

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Picture formating/moving (Word 2000)

    I've always been irritated by this behaviour of Word 2000. I've no idea why but it just won't let you record this stuff with the Macro recorder.

    When you insert a picture in Word2000 it defaults to being Inline, to convert a shape between being an inline shape and a standard shape you can use

    <pre> inlineshp.ConvertToShape
    or
    shp.ConvertToInlineShape
    </pre>


    You can then manipluate the shape with commands such as

    <pre>With shp
    .Left = InchesToPoints(0.6)
    .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
    .Top = InchesToPoints(1)
    .RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
    .WrapFormat.Side = wdWrapLeft
    .WrapFormat.Type = wdWrapTopBottom
    .Width = InchesToPoints(3)
    .Height = InchesToPoints(2)
    End With
    </pre>


    StuartR

  5. #5
    Lounger
    Join Date
    Feb 2002
    Location
    Summerville, South Carolina, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture formating/moving (Word 2000)

    Thanks, Stuart. It didn't take me long to figure out that I was probably going to have to do what I wanted to do with VBA, but short of what is recorded by the macro recorder, I knew I wasn't going to be able to write any code to do it. I know just enough about VB to see what is going on, but that's about it. Thanks again, I'm off to play with the template.

    Bill Blazer

  6. #6
    Lounger
    Join Date
    Feb 2002
    Location
    Summerville, South Carolina, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture formating/moving (Word 2000)

    Stuart,

    Apparently, something more needs to be added to the "convert" statements you suggested. I've found that I can say something like "ActiveDocument.InlineShapes..." but the inlineShapes phrase seems to need an argument of some sort.. Is there someway to just tell it to convert the selected picture to an shape?

    Each time this template is used, I have to choose the folder that contains the pictures I need. Then, I start inserting pictures. So, the sequence is: insert picture, select it then format it then move on to the next picture (two pictures/page).

    Bill Blazer

  7. #7
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Picture formating/moving (Word 2000)

    Assuming that you have the inlineshape selected then you can use

    <pre>Dim shp as Shape
    Set shp = Selection.InlineShapes(1).ConvertToShape
    </pre>


    StuartR

  8. #8
    Lounger
    Join Date
    Feb 2002
    Location
    Summerville, South Carolina, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture formating/moving (Word 2000)

    Thanks again Stuart. I've made some headway but now stumbling over inserting and formating the second picture on the page. I think that index number is the problem but not sure. The macro works fine for the first picture, but when moving down the page and the second picture is inserted and executing the macro, the picture is moved up and overlaps the first picture. Since each time this template is used, and the number of photos/pages varies, I'm beginning to get concerned that there may have to be a loop or something to continue cycling through the photos until finished. If that's the case, then how would one pause the macro to insert another photo? Sure was a lot easier in 97.

    Back to the Superbowl.

    Regards,

    Bill Blazer

  9. #9
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Picture formating/moving (Word 2000)

    Once you get used to it I think you will find that the flexibility of VBA gives you a lot more control than the old Word Basic. Persevere - it's worth the effort.

    Can you post the code you are using and we can look to see what is happening.

    If you had the wrong index number then you might move the wrong picture. It seems more likely that you are using the code I posted literally - this set the top of the picture to 1 inch from the top of the page, it was meant as an example only.

    StuartR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •