Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Darkest Kent, UK., Kent, England
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Float over text vs. Macro (97)

    My question is this:

    I am in the process of placing a lot of screen dumps onto a Word doc and for convenience and continuity I add a 1pt border around them, select 'Picture' from my customised Style Gallery and then do a 'Format Picture, Position' and clear the 'Float Over Text' box. I have tried to record a macro to do all of this in one hit, but the F.O.T. is greyed out preventing me from recording that part of the sequence.

    Any ideas?

    This only needs to be a simple solution; if it can't be done, I'll have to do it the long way.

    Tks.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Float over text vs. Macro (97)

    If you can record it in two steps, or even in two macros, then we probably could help you put it all together. (Now I use 2000 and I think it is called something else entirely.)

  3. #3
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    Here's what I believe is your problem, Fish. Adding the border makes it more than one object. Drawing objects, such as your border, don't have the ability to NOT be float over text (Word 2000 calls it "in line with text"). If you're putting a colored border on it, I can't help and I don't think anyone else will be able to. If you're just adding "padding" to the edge of the picture, we can do something else.

    If your heart is set on the border, I think you're going to have to have an interim step, such as pasting into Paint (or a better graphic program) and add the frame there.

    Or, if your screen shots are all the same size, you may be able to manage this: Create a black box that's just one point bigger all the way around than your picture. Put the picture on top of it (hold the alt key to drag precisely) and group the two objects. cut the picture, hit Edit-paste special-As picture. Then you can remove the float-over-text property.

    One trick, if you decide to do without the border. You can insert all your pictures as float over text, grab the first one and remove the float over text property. Hit the second one and hit F4, the 3rd one and hit F4 (F4 repeats the last command).

  4. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    A kludge you might be able to try is to insert pictures into a table. Define a cell just larger than your picture (Use exact row height). Format the cell with a background, and set vertical alignment to "center' before inserting the picture.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  5. #5
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    NO I am sorry, but Applying Borders and Shading to an Inline Image in Word 97 AND Word 2000 allows it to remain an Inline Image.

    I just tested this in Word 2000 and Word 97, and using Borders and Shading on an Inline Image makes it remain an Inline Image, it does NOT force it to be FLOAT OVER TEXT, if that were true then Borders and Shading would start making Paragraphs into images.

    When made a FLOAT OVER TEXT object in either Word 2000 or Word 97, you then have to switch to Colors and Lines to get your border, by picking a Color, Style, Dashed, and Weight setting.

    What Fish is running into is the fact that the Macro Recorder doesn't allow one to pick certain image settings while recording, whether the image is already Float Over Text or already Inline. However, I believe you could run through the collection of Images in VBA, and apply the appropriate formatting properties to each one.

    When I have time to code I'll try it.

  6. #6
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    How willing are you to use VBA itself, and not record a macro?

    I just tried it and you can convert any Float Over Text Images in Word 97 using the Shapes collection and the ConvertToInlineShape Method found in Help. The Shapes collection includes any Float Over Text Pictures in a Word document.

    You can then use the InlineShapes collection to get to every picture, get to the borders object and set the borders formatting properties appropriately.

    If you are interested in VERY CRUDE code let me know.

    FWIW

    TomG

  7. #7
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    Here's an attached text file of the sample code I created to first take a selected Float Over Text Image, convert it to an Inline Image, then turn a 1pt border on.

    Does this help?

    TomG
    P.S. The code is provided As Is, without warranty of any kind. I don't assume it's the most efficient way to do this, nor is this code in any way complete, as there's no error checking. I'm sure someone on the lounge could probably point out an easier method, however it is intended to be educational to show you that what you are asking can be done. This code works if you first select a Float Over Text image, then run the macro.

    With modifications you could make this code work for each Shape in the Shapes collection, rather than have to select them as you insert them into your document.
    Attached Files Attached Files

  8. #8
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Darkest Kent, UK., Kent, England
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Float over text vs. Macro (97)

    Thanks Tom, that's got it.

    Thanks also to everyone else.

Posting Permissions

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