• Problems placing figures in a document

    Author
    Topic
    #352149

    This is driving me crazy! I will try to be succinct…

    I am working on a report for a client which is going to be published which has several figures located on “specific” pages throughout the document. For instance, when the text “mentions” Figure XX on page 3, they want Figure XX to be on the next page (in this case, page 4) all by itself, with the text continuing on page 5. They also want the text in two columns and justified, with different odd and even footers.

    No matter what I try, I can’t seem to do this. I have tried using frames and text boxes, I have tried playing with section breaks and page breaks, I have tried everything I can think of, to no avail. What I end up doing is pushing the figure to the next page when I continue entering text, or the figure moves in unexpected places (like on top of other figures). I am not exactly a neophyte at this, but this is driving me nuts!

    Anyone out there have some ideas for me to try? There must be an easy way to do this, I just haven’t found it!!!

    HELP!!!!!!!!! Save me from myself!

    Viewing 5 reply threads
    Author
    Replies
    • #511440

      I’m just going to describe one way to deal with the paging, picture positioning, and page reference. I don’t understand where you mean the columns to be, so I’m not including that in my reply.

      At the end of the text before the picture, insert a section break, next page.

      On the new page, insert your picture. Right click the picture, format picture, on the position tab, untick float over text. With the picture not selected, insert a bookmark, hidden. You have to name it.

      Insert a section break on that page, next page.

      Back on the first page, where you want the page number that the picture is on, insert field, pageref; under options, select the bookmark name.

    • #511455

      Like Wendy I’m not too sure about the column thing – is the entire document in two columns? I’ll ignore this part of it at the moment.

      I may have an easier way than Wendy’s to reference your pictures. After you have inserted them and made them unfloating as per Wendy’s post, select the picture and then Insert | Caption | Figure
      Then to cross reference the picture: Insert | Cross Reference | Reference Type: Figure and select the type of reference you want (ie page number, caption text, figure number).

      Now, to force the picture to be on a new page you need to ensure that it is in a paragraph with the style set so that there is always a page break before the paragraph.

      Format | Style | New
      Give the style a name and then select the Format button. Paragraph formatting, line and page breaks gives you the option to set a page break before the paragraph.

      Hope this helps
      Karen

      • #511467

        Thanks, Karen and Wendy, for your suggestions. I am working on them now. But my problem seems to be because the document is two columns throughout it’s length (like newspaper columns). Let’s see if I can clarify this. Visualize Page one as two columns full of text which continues on to Page 2 for several sentences. What I need is for the several sentences to continue onto Page 3 INSTEAD of Page 2–with my Figure on page 2 all by itself. I can get the figure on a page by itself, but I can’t seem to put it on the actual page I want it on. Does that make sense? I’ll check back tomorrow and let you know how your suggestions worked.

        • #511597

          Hi Snazz,

          I think the problems you’re having really relate to the two columns, and forcing the picture to always be on a page by itself – Karen’s solution works well and I can’t think of a more automatic way.

          I have used Word for many technical manuals with pictures/screen dumps etc, however we always use a one column format with a wide left margin, and paragraphs indented from the headings to give plenty of white space.

          Publisher definitely won’t give you the text capabilities of Word, and even its text flow from page to page can be a pain.

          You might want to look at one of the desktop publishing packages – CorelDraw, Pagemaker etc.

          Karen

    • #511474

      Besides the fact that you are doing this type of layout in the wrong application you can actually do this in Word but it is not bullet-proof for you adding text or graphics near there.

      If the graphic spans both columns then you probably need to float the image and have a look at the method of text wrapping and what the anchor properties are tied to and how they are described. The anchor is attached to a nearby paragraph and may be described as positioned relative to page, paragraph or column. What then happens if the anchor paragraph moves is what you need to pay attention to.

      Adding text between the graphic and it’s anchor can have what appears to be an odd effect but you need to understand the anchor properties to work it out.

    • #511484

      Hello, Snazz — In general, all seem to agree on the basic “hows” to get this done, and from your question, you seem to have a pretty good idea. However, I don’t know if you’re working on Word2000, 97, 95 or (Heaven forbid) something earlier.

      I also agree with Andrew, that although Word is capable of these types of layouts… that doesn’t make it the best[/b] choice.

      That said, please take a look at the attached, which was quickly thrown together in 2000 (but to verify compatibility, I saved to 6.0/95).

      First, format document in 2 columns. At the point you want to break your text to start the next page for figure, Insert / Section Break / Continuous (this will make your columns equal length); then immediately insert 2 next page section breaks. You now have a blank page on which you can insert your figure. I didn’t do figure, caption and cross-ref ‘coz I figure you already know how if you’re doing a technical document… and, well… I’m lazy. But you get the idea.

      HTH!

      • #511565

        So, are you and Andrew saying I should consider using Microsoft Publisher? And if so, don’t I lose some of the functionality of Word, like automatic page numbering (with numbers like iii), and automatic Tables of Contents, Lists of Tables/Figures, etc.? IS Publisher used for technical reports? Or is there a better product to use?

        • #511612

          Some possible packages to do complicated layouts in are:
          Quark Xpress
          Adobe Framemaker, Adobe InDesign & Adobe Pagemaker
          Ventura Publisher
          Microsoft Publisher
          Interleaf

          Each has benefits and drawbacks and most cost big $ and have huge learning curves.

          I personally try hard to avoid Word for layout type jobs where you mix column setups. It is a capable enough tool but other packages offer many benefits in layout control.

          The best advice if doing it in Word is to do your layout last. Get all the words and graphics together in the document with styles but no layout applied and then go through the document to lay it out as you want it. Major edits in a Word document with multiple layouts are problematic and require detailed knowledge of how Word works.

      • #511592

        Hi Karen,

        It’s me again. I forgot to mention I am using Word 2000 (SR-1). I have worked with your suggestion and so far it seems to be better than anything else I have tried. I did manage to open the document in MS Publisher and play with it a bit. It was MUCH easier to place figures, but it also lacks several things which make formatting a technical report easier (such as various types of page numbering and making Tables of Contents, etc).

        Anyway, thanks again to ALL who have made the effort to help me…it is very much appreciated. I hope to have time to visit this forum and give my “two cents” occasionally!

    • #513263

      What you could do is creating a textbox on the page where the picture should be and make sure the textwrap is top – bottom.
      If the textbox is slightly bigger than the text area is moves all the textlines to the next page. Put your picture in the textbox.

      I hope this could help you

    • #514211

      Some interesting ideas here. I tried your suggestion, AndrewG, to see how it would work. While it’s a little tricky to format the text boxes, that part can be done

      You suggested that setting up a template would work. I may be missing something, but it seems to me that you wouldn’t know, in advance, where to interrupt the text boxes with the pictures. And if you later added more text, the placement of the text vs. the pictures would change.

      I’m probably missing something, so if you would care to explain further, I’d be interested.

      • #518082

        We have resolved this problem fairly elegantly by writing a single macro to (a) create a text box with the required defaults like no internal margins, etc; ( pop up a dialog box asking user to specify figure file name; © retrieve and place the figure into the text box; (d) capturing the height and width of the figure as variables, and (e) applying the value of these variables to the dimensions of the text box within which the figure is contained.

        All this is done seamlessly : the users only click a button which runs the macro called Insert Image, and then provide the path and name of the figure to be inserted. Often, we even hard-code the path in the macro so that, for a particular job, the user has to choose from a list of figure files meant for a particular job only.

        The figure is placed by default at one corner (top left or bottom right) or centred at the bottom or top of the page, depending on the job.

        • #518242

          Hi Rajesh:

          Would you care to post the code? It sounds useful.

          Thanks in advance.

          • #518244

            Thanks, Phil, for your interest. In the few days I have been “lounging”, I have become quite a fan of yours.

            Will try and do that when I get back into office after the weekend.

            Rajesh

          • #518252

            Here goes the code. It was written some time back, and I haven’t run it again to iron out any deficiencies. Also, not too well-documented. Sorry for that.

            Sub insertimage()

            ‘ insertimage Macro
            ‘ Macro recorded 1/5/01 by Rajesh H

            ‘ Inserting a top aligned text box

            ‘For I = 0 To 1
            ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 90#, _
            72#, 261#, 90#).Select
            Application.ScreenUpdating = False
            Selection.ShapeRange.TextFrame.TextRange.Select
            Selection.Collapse
            Selection.ShapeRange.Select
            Selection.ShapeRange.Fill.Visible = msoFalse
            Selection.ShapeRange.Fill.Transparency = 0#
            Selection.ShapeRange.Line.Weight = 0.75
            Selection.ShapeRange.Line.DashStyle = msoLineSolid
            Selection.ShapeRange.Line.Style = msoLineSingle
            Selection.ShapeRange.Line.Transparency = 0#
            Selection.ShapeRange.Line.Visible = msoFalse
            Selection.ShapeRange.LockAspectRatio = msoFalse
            Selection.ShapeRange.Height = 90#
            Selection.ShapeRange.Width = 340#
            Selection.ShapeRange.TextFrame.MarginLeft = 0#
            Selection.ShapeRange.TextFrame.MarginRight = 0#
            Selection.ShapeRange.TextFrame.MarginTop = 0#
            Selection.ShapeRange.TextFrame.MarginBottom = 0#
            Selection.ShapeRange.RelativeHorizontalPosition = _
            wdRelativeHorizontalPositionColumn
            Selection.ShapeRange.RelativeVerticalPosition = _
            wdRelativeVerticalPositionPage
            Selection.ShapeRange.Left = wdShapeCenter
            Selection.ShapeRange.Top = wdShapeTop
            Selection.ShapeRange.LockAnchor = False
            Selection.ShapeRange.WrapFormat.AllowOverlap = False
            Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
            Selection.ShapeRange.WrapFormat.DistanceTop = 0
            Selection.ShapeRange.WrapFormat.DistanceBottom = 18
            Selection.ShapeRange.WrapFormat.DistanceLeft = 9
            Selection.ShapeRange.WrapFormat.DistanceRight = 9
            Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
            Selection.ShapeRange.Fill.Visible = msoFalse
            Selection.ShapeRange.Fill.Transparency = 0#
            Selection.ShapeRange.Line.Weight = 0.75
            Selection.ShapeRange.Line.DashStyle = msoLineSolid
            Selection.ShapeRange.Line.Style = msoLineSingle
            Selection.ShapeRange.Line.Transparency = 0#
            Selection.ShapeRange.Line.Visible = msoFalse
            Selection.ShapeRange.LockAspectRatio = msoFalse
            Selection.ShapeRange.Height = 90#
            Selection.ShapeRange.Width = 261#
            Selection.ShapeRange.TextFrame.MarginLeft = 0#
            Selection.ShapeRange.TextFrame.MarginRight = 0#
            Selection.ShapeRange.TextFrame.MarginTop = 0#
            Selection.ShapeRange.TextFrame.MarginBottom = 0#
            Selection.ShapeRange.RelativeHorizontalPosition = _
            wdRelativeHorizontalPositionColumn
            Selection.ShapeRange.RelativeVerticalPosition = _
            wdRelativeVerticalPositionMargin
            Selection.ShapeRange.Left = wdShapeCenter
            Selection.ShapeRange.Top = wdShapeTop
            Selection.ShapeRange.LockAnchor = False
            Selection.ShapeRange.WrapFormat.AllowOverlap = False
            Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
            Selection.ShapeRange.WrapFormat.DistanceTop = 0
            Selection.ShapeRange.WrapFormat.DistanceBottom = 18
            Selection.ShapeRange.WrapFormat.DistanceLeft = 0
            Selection.ShapeRange.WrapFormat.DistanceRight = 0
            Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
            Application.ScreenUpdating = True

            ‘Next I

            ‘ comes over here

            Fname = InputBox(“Enter the file name”, “File Name”, “Pic01f”)
            On Error GoTo imgerrormsg

            Selection.InlineShapes.AddPicture FileName:= _
            “H:ARTWORKCurrentJobPictures” & Fname & “.eps”, LinkToFile:=True, SaveWithDocument _
            :=False

            Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend

            Selection.InlineShapes(1).Reset
            Y = Selection.InlineShapes(1).Height
            x = Selection.InlineShapes(1).Width
            Selection.MoveRight Unit:=wdCharacter, Count:=1

            Selection.ShapeRange.Height = Y
            Selection.ShapeRange.Width = x

            Selection.MoveLeft Unit:=wdCharacter, Count:=1

            ‘Another text box for Image Caption

            ActiveDocument.Shapes.AddTextbox(msoTextOrientationHorizontal, 90#, _
            72#, 261#, 90#).Select
            Application.ScreenUpdating = False
            Selection.ShapeRange.TextFrame.TextRange.Select
            Selection.Collapse
            Selection.ShapeRange.Select
            Selection.ShapeRange.Fill.Visible = msoFalse
            Selection.ShapeRange.Fill.Transparency = 0#
            Selection.ShapeRange.Line.Weight = 0.75
            Selection.ShapeRange.Line.DashStyle = msoLineSolid
            Selection.ShapeRange.Line.Style = msoLineSingle
            Selection.ShapeRange.Line.Transparency = 0#
            Selection.ShapeRange.Line.Visible = msoFalse
            Selection.ShapeRange.LockAspectRatio = msoFalse
            Selection.ShapeRange.Height = 90#
            Selection.ShapeRange.Width = 340#
            Selection.ShapeRange.TextFrame.MarginLeft = 0#
            Selection.ShapeRange.TextFrame.MarginRight = 0#
            Selection.ShapeRange.TextFrame.MarginTop = 0#
            Selection.ShapeRange.TextFrame.MarginBottom = 0#
            Selection.ShapeRange.LockAnchor = False
            Selection.ShapeRange.WrapFormat.AllowOverlap = False
            Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
            Selection.ShapeRange.WrapFormat.DistanceTop = 0
            Selection.ShapeRange.WrapFormat.DistanceBottom = 18
            Selection.ShapeRange.WrapFormat.DistanceLeft = 9
            Selection.ShapeRange.WrapFormat.DistanceRight = 9
            Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
            Selection.ShapeRange.Fill.Visible = msoFalse
            Selection.ShapeRange.Fill.Transparency = 0#
            Selection.ShapeRange.Line.Weight = 0.75
            Selection.ShapeRange.Line.DashStyle = msoLineSolid
            Selection.ShapeRange.Line.Style = msoLineSingle
            Selection.ShapeRange.Line.Transparency = 0#
            Selection.ShapeRange.Line.Visible = msoFalse
            Selection.ShapeRange.LockAspectRatio = msoFalse
            Selection.ShapeRange.Height = 90#
            Selection.ShapeRange.Width = 340.15
            Selection.ShapeRange.TextFrame.MarginLeft = 0#
            Selection.ShapeRange.TextFrame.MarginRight = 0#
            Selection.ShapeRange.TextFrame.MarginTop = 0#
            Selection.ShapeRange.TextFrame.MarginBottom = 0#
            Selection.ShapeRange.RelativeHorizontalPosition = _
            wdRelativeHorizontalPositionColumn
            Selection.ShapeRange.RelativeVerticalPosition = _
            wdRelativeVerticalPositionMargin
            Selection.ShapeRange.Left = wdShapeCenter
            Selection.ShapeRange.Top = Y
            Selection.ShapeRange.LockAnchor = False
            Selection.ShapeRange.WrapFormat.AllowOverlap = False
            Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
            Selection.ShapeRange.WrapFormat.DistanceTop = 0
            Selection.ShapeRange.WrapFormat.DistanceBottom = 18
            Selection.ShapeRange.WrapFormat.DistanceLeft = 0
            Selection.ShapeRange.WrapFormat.DistanceRight = 0
            Selection.ShapeRange.WrapFormat.Type = wdWrapTopBottom
            Application.ScreenUpdating = True

            Selection.ShapeRange.RelativeVerticalPosition = _
            wdRelativeVerticalPositionMargin
            Selection.ShapeRange.Top = Y

            ‘Comes over here

            imgerrormsg:
            MsgBox “Check-it-out the image name in H:ArtworkCurrentJobPictures*.* Path”, vbCritical
            End Sub

            • #518269

              Rajesh,

              two quick comments (without testing the code):

              1. You are doing very similar things several times. It may be useful to put those common bits of code into a routine. Not only do you make the code easier to maintain and understand, but you can be starting the building blocks for stuff you do later.

              2. (A favourite bugbear of mine- ever since I found out about it- 12 months after starting VBA).
              Using ranges instead of selections can improve efficiency of code drastically. “Selection” involves changing screen displays; range does not. This means the changes in response time become much more than just academic- they can be quite noticable.

            • #518285

              Hi Geoff:

              This is probably more appropriate for the VBA board, so if you feel like moving it… I know how to replace a series of “Selection” with “With Selection/End With”. Using some of his code above, could you give an example of how to change the “Selection” method to a “Range” method?

              In testing the macro, I notice that even though I’ve made appropriate path & name modifications, a picture inserts, but the error message always comes up at the end. It seems that the command labelled “imgerrormsg:” always shows the message box. Is there a way to skip that message box when there is no error?

              Thanks in advance.

            • #518311

              Phil,

              I’ve copied, rather than moved, the code to here.

              Just one quick answer here though

              >. Is there a way to skip that message box when there is no error?

              Yes. Put in “Exit sub” just before the “imgerrormsg:” label

              Geoff

            • #518375

              Geoff/Phil:

              And now that the code has been moved to the VBA board, is there some plan to move a “final answer” back to the Word board? I’d love to see what becomes of this there but I really don’t want to subscribe to the VBA board just to follow this one.

              I’ve seen other posts where an item gets moved/copied to another board but it’s useful to somehow keep the people on the original board aware of what’s going on.

              Or is there a way of doing this w/o subscribing that I’m just missing?

              Thks.

              Fred

            • #518377

              Fred,

              When there’s some settled-down solution, I’ll post a link to the VBA thread. In the meantime, you can click on the link in the previous post to check.

              It’s difficult sometimes to draw the line where a post should be. Quite often, a solution to a user problem is VBA code- and that glazes the eyes of many.

              In this trhead, I started along the lines of dissecting the code, and as Phil mentioned, that warranted discussion on the VBA board.

              Do you visit online often? Or are you just subscribing by digests? Is it an option for you just to pop into the VBA board from time to time to check?

            • #518477

              Geoff,

              I am online often but not on the Office boards. I only go there as a result of subscribing to digests. I don’t subscribe to the VBA board bcs that would probably glaze my eyes over quickly. Moreover, there’s probably a lot of VBA stuff there dealing with appls that I have no interest in (or time for).

              I recognize this is a hard issue. I appreciate you posting a link to the VBA thread when this is settled.

              This gets to another item I had suggested but got little traction on – knowing where to look for solutions to problems. This thread already has about 26 emails on it. Where do you look for a solution? Assuming it’s even on 1 board. Looking thru 26 emails is NOT fun – even in flat mode with ALL pages showing (and I’ll bet this exceeds 30-40 when done). Then you need to piece together a few emails to get the solution (or a solution).

              Thanks for the effort. BTW, did you see my email where I suggested an enhancement about placing the text box? That alone could generate a few emails – beyond the few I already saw on “fixing” Rajesh’s current solution.

              Fred

            • #518403

              Many Thanks for te tips.

              I wrote the macro by merely recording macros and tweaking it to the extent necessary to achieve the effect I wanted.

              Will certainly kee your tips in mind.

            • #518435

              Rajesh,

              I could see that it was recorded- the fact that I’ve made comments is certainly no criticism of your code. You’ve taken a good idea, made it work for you, and posted it for all the world to see.

              I hope that by my contributions, we’ve bith helped other people to learn more. I certainly have.

            • #518440

              Thanks, Geoff

              You made my day!

        • #518373

          Rajesh,

          Can’t wait to see the macro for this. I’ve always seen this as a weak point in word.

          My (very) old word processor (in Unix) also had one other feature that I really want that seems somewhat related (you mentioned several placements as “defaults”). Not sure if it’s in your macro but thought I’d ask.

          For figures that you will NOT wrap text around (ie, wrapping is above/below), placement of the text box determines what text comes after the text box on the same page.

          For example, suppose my text box, when all is said and done, is 4″ high. If the preceding text ends at 4″ down the page, then the text box and the subsequent text (1″ or so) will be on the same page.

          But suppose my preceding text ends at 6″ down the page (or I insert text early in my doc that adds 2″ on the page with the text box). Then my text box gets bumped to a new page and the following text follows it on the new page – creating a space at the bottom of my previous page.

          Is there some automated way to position the text box AND fill any (significant) white space left as a result of pushing the text box to a next page? Of course, this would only be an option since some might want to not re-order the text box and the following text.

          Thks.

          Fred

          • #518405

            Dear fburg

            The macro is already posted on this board a few messages above. Geoff has moved the same to the VBA Board and also tweaked it and made it more effective and compact.

            To ensure that your text box does not jump when you add/delete text on the page, before adding/deleting text, lock anchor of the text box to a paragraph which will certainly either begin or end on the same page even after the addition/ deletion. Also, uncheck the move with text box.

            If by chance the text box has jumped to the next page, and you don’t mind the box on that page, but want to push back some text, then drag the object anchor to the next paragraph. As much of the earlier paragraph which can be accommodated on the earlier page will get pushed back, and the box will remain on the page it has jumped to.

            • #518483

              Rajesh,

              I saw the macro posted by Geoff.

              Also, thks for the idea of moving the anchor. I was hoping for something a little more automatic. Maybe the people on the VBA board can help with this part. What you did certainly seems to go a long way.

              Fred

            • #518492

              Dear fburg

              A couple of other tips:

              Another good idea to avoid jumping of figures/ text boxes is to temporarily put a section break (Next Page) after the point where you do not want your pagination messed up.

              If you have a grouped object which you want to ungroup without a messup, copy the grouped object to a new empty file based on the same template as the current one, do all the ungrouping there, and then after the object is done, come to the original file, put a section break as explained above at the end of the page on which you want to place the grouped object, and delete the original grouped object and replace it with the newly grouped object. After this is done, the section break can be deleted from Normal View.

            • #518507

              Rajesh,

              Thks for the ideas. I usually try to avoid doing much graphic operation in Word. I usually “construct” things in another program, bring them into Word, and be finished.

              Also, to bring them into Word and not take up a large amount of space (and slow down scrolling, etc), I usually paste special as a bitmap/picture. Unfortunately, this loses the ability to go back from Word and re-edit the original in its native application. SO I maintain the original in whatever filetype it is, edit it in its application, and re-do the copy/paste to get it back to word. Actually, a blessing in disguise. So I usually avoid the kind of problems the section break would solve.

              Fred

            • #518543

              I have found the approach of linking (rather than embedding) to the pictures better than non-dynamic approach which involves re-working in the final application.

              This is especially critical in figure-heavy files, where figures are often worked on and corrected independently of persons paginating the Word file.

            • #536720

              I have since found that it is quicker and more elegant to paste a text box with specified characteristics in a file by using AutoText rather than creating the text box using a macro.

    Viewing 5 reply threads
    Reply To: Problems placing figures in a document

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

    Your information: