Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    East Tennessee
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Picture Formats (Word 97)

    Is there a way to change the defaults on the Format Picture/Position?

    I have been inserting pictures and would like to use the "Float over Text" and deelect the "Move with Text".
    Now I have to go in and change these items each time I bring in a picture.

    Thanks
    Win 8, Firefox 16.0.2, Thunderbird 15.0.2

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

    Re: Picture Formats (Word 97)

    Changing the Insert Picture default to 'float over text' is relatively easy.
    Changing the default to deselect 'move with text' is trickier.

    To do the first, you can create a macro called "InsertPicture" and put it in your Normal.dot or in a global template that opens on startup. This hijacks Word's built-in InsertPicture command and runs the code in the macro instead. The first part of the macro below does this, and also changes the setting to turn 'float over text' on.

    The second part of the macro attempts to address the newly-inserted picture and change its 'move with text' property - it's possible to do that, but appears difficult to do so programatically without having the picture subject to jumping to an unexpected location:

    <pre>Public Sub InsertPicture()
    'Gary Frieder
    'Tested on Word 2000
    Dim MyShape As Shape
    Dim lngShapesCt As Long
    With Dialogs(wdDialogInsertPicture)
    'change the default:
    .FloatOverText = True
    .Show
    End With
    'Newly inserted shape should be highest number in shapes collection, so:
    lngShapesCt = ActiveDocument.Shapes.Count
    Set MyShape = ActiveDocument.Shapes(lngShapesCt)
    'Warning: these next two lines may give unexpected results:
    MyShape.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
    MyShape.RelativeVerticalPosition = wdRelativeVerticalPositionPage

    Set MyShape = Nothing

    End Sub
    </pre>

    Gary

  3. #3
    4 Star Lounger
    Join Date
    Mar 2001
    Location
    Bismarck, ND, USA
    Posts
    451
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Formats (Word 97)

    Do you have something like this for XP? It is always inserted "In Line With Text", and I would prefer "Square".

    TIA!
    egghead

  4. #4
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    East Tennessee
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Picture Formats (Word 97)

    Thanks for your input, I'll try it.

    You have also I guess answered the question that there is not a direct way to change the default settings.

    Are all of those kind things buried somewhere in a Preference file or in the registry?
    Win 8, Firefox 16.0.2, Thunderbird 15.0.2

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

    Re: Picture Formats (Word 97)

    <<Are all of those kind things buried somewhere in a Preference file or in the registry?>>

    If it were a 'sticky setting' that remembered how you last left it, then I'd suspect there was some location in the registry where it could be changed. Since it isn't, my guess is that a VBA workaround is the only way to get at it.

    Gary

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

    Re: Picture Formats (Word 97)

    egghead,

    I don't have XP, but if it works the same as in Word 2000, then adding the following line of code to the previous macro should do the trick (you can remove the lines about relative horizontal position if they are not relevant to your situation):

    MyShape.WrapFormat.Type = wdWrapSquare

    Gary

    PS: here's how the code would then look:

    <pre>Public Sub InsertPicture()
    'Gary Frieder
    'Tested on Word 2000
    'This version changes layout setting to 'Square'
    Dim MyShape As Shape
    Dim lngShapesCt As Long
    With Dialogs(wdDialogInsertPicture)
    'change the default:
    .FloatOverText = True
    .Show
    End With
    'Newly inserted shape should be highest number in shapes collection, so:
    lngShapesCt = ActiveDocument.Shapes.Count
    Set MyShape = ActiveDocument.Shapes(lngShapesCt)
    MyShape.WrapFormat.Type = wdWrapSquare

    Set MyShape = Nothing

    End Sub
    </pre>

    (Note to Sammy B.: although the 'Myshape' object variable isn't necessary in this version of the macro, I'm leaving it in 'cause it gives greater flexibility if one wanted to address more properties of the object in a later version of the macro.)

  7. #7
    4 Star Lounger
    Join Date
    Mar 2001
    Location
    Bismarck, ND, USA
    Posts
    451
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Formats (Word 97)

    Gary,

    Thanks--this did work in XP version. One more question, though. Do you know what I would have to change/add to have it insert ClipArt that way?

    Thanks!
    egghead

  8. #8
    4 Star Lounger
    Join Date
    Mar 2001
    Location
    Bismarck, ND, USA
    Posts
    451
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Picture Formats (Word 97)

    I actually found another way which works with both pictures from files and Clipart:

    Public Sub PicWrap()
    With Application.Options
    If .PictureWrapType <> wdWrapMergeSquare Then
    .PictureWrapType = wdWrapMergeSquare
    End If
    End With
    End Sub

    Thanks for getting me started on the right track!
    egghead

Posting Permissions

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