• Float over text vs. Macro (97)

    Author
    Topic
    #359740

    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.

    Viewing 3 reply threads
    Author
    Replies
    • #540162

      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.)

      • #540201

        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).

        • #540238

          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.

    • #540230

      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.

    • #540239

      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

    • #540242

      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.

      • #540346

        Thanks Tom, that’s got it.

        Thanks also to everyone else.

    Viewing 3 reply threads
    Reply To: Float over text vs. Macro (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: