Results 1 to 7 of 7
  1. #1
    jstouse
    Guest

    Frustration Level Exceeded! W2K Shape Issue

    I've been bashing my brains out for about 6 hours now, and what little is left is stumped. Any help would be gratefully appreciated--I'm trying to insert a graphic into a header and then format it so that it has a watermark type, no word wrap, and the graphic is behind text.
    I can insert the graphic into the document by adding a shape.picture, but then the graphic isn't part of the header and consequently only appears on the first page.
    Or, I can add an inlineshape to the header, but then I can't work with it--when I try to convert it to a shape (so it can float in the header and isn't aligned with any other text the user may want to add) I get an error message that says the shape is not a member of the collection. I have a blank document with only the single graphic file inserted into the header.
    I must be missing something about how to find and work with the graphic while in the header.
    Really, any help on this would be greatly appreciated.
    I'm going to cry when you tell me how easy this is, but I really need to get this done ASAP.

    TIA

    P.S. Here's what I'm working with:

    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
    ActiveWindow.Panes(2).Close
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
    ActivePane.View.Type = wdOutlineView Then
    ActiveWindow.ActivePane.View.Type = wdPrintView
    End If
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    ActiveDocument.Shapes.AddPicture FileName:= _
    "Eocuments and SettingsJeffApplication DataMicrosoftTemplatesHM WordToolsGraphicsdraft.jpg" _
    , LinkToFile:=False, SaveWithDocument:=True
    ' next set the picture format to watermark, and center the picture on the page
    ActiveDocument.Shapes(1).PictureFormat.ColorType = msoPictureWatermark
    ActiveDocument.Shapes(1).RelativeHorizontalPositio n = wdRelativeHorizontalPositionPage
    ' finally, set the WordWrap format so that the text will wrap over the graphic
    With ActiveDocument.Shapes(1).WrapFormat
    .Type = wdWrapNone
    End With
    ActiveDocument.Shapes(1).ZOrder (msoSendBehindText)
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Frustration Level Exceeded! W2K Shape Issue

    Have you tried using Frames. This works with Word 97

    Go to the Header, Insert Text Box, then Right Click on the Text Box, select Format, and on the Text Box tab click convert to frames.

    Then Format the frame, set position for both Horizontal and Vertical to center relative to page.

    You can then insert your graphic into the frame and format as required.


    Hope you can follow that and find it useful.

    Andrew C

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

    Re: Frustration Level Exceeded! W2K Shape Issue

    Hi,

    Sorry, I can't help you with the VBA for this one.

    I can tell you what I've done manually to do the same, just in case that helps.

    .View, Header and Footer
    .Insert, Picture from file, select the directory and picture to insert
    .Right click on the picture. Select "format object" (or "format picture")
    .Select the "layout" tab
    .Click the "behind text" icon
    .Move/resize the picture to suit.

    I'm sorry that doesn't directly address your question. maybe there's something there to help.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    jstouse
    Guest

    Re: Frustration Level Exceeded! W2K Shape Issue

    Andrew,

    Thanks for the input. My problem, however, remains that while I can create the desired effect manually, I am developing a shortcut macro for the entire office to use (i.e., for users who would probably end up giving up before they got this accomplished themselves.) The reason my problem remains is that I keep running into situations in the manual process, that when I try to record them, cannot be recorded (inserting a text box in a header in your post is something that cannot be recorded, and I'm trying like heck to figure out how to do it using VBA.) I can't for the life of me figure out how to format a graphic inserted into a header so that it doesn't wrap, sits behind the text, and has the picture type of a watermark.
    Hope this helps clarify my situation, and thanks again for your response.

    Jeff

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Frustration Level Exceeded! W2K Shape Issue

    Hi Jeff,

    The following piece of code might achieve what you are looking for without the use of Frames, Boxes or Pictures.

    I presume from reading your original post that you want a watermark to indicate the document is a draft.

    This can be achieved by using WordArt and the following is a recorded macro to do just that. You may want to play around with it or try doing it with your choice of WordArt formatted as best suits your purposes.

    Sub DraftStamp()

    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
    ActiveWindow.Panes(2).Close
    End If
    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
    ActivePane.View.Type = wdOutlineView Or ActiveWindow.ActivePane.View.Type _
    = wdMasterView Then
    ActiveWindow.ActivePane.View.Type = wdPageView
    End If
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.HeaderFooter.Shapes.AddTextEffect(msoTex tEffect13, "D R A F T", _
    "Impact", 96#, msoFalse, msoFalse, 144.95, 139.1).Select
    Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 0)
    Selection.ShapeRange.Fill.Visible = msoTrue
    Selection.ShapeRange.Fill.Solid
    Selection.ShapeRange.Shadow.Visible = msoFalse
    Selection.ShapeRange.Align msoAlignCenters, True
    Selection.ShapeRange.Align msoAlignMiddles, True
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    End Sub

    Hopefully it will at least give you something to work with.

    Andrew C.

  6. #6
    jstouse
    Guest

    Re: Frustration Level Exceeded! W2K Shape Issue

    Andrew,

    *Thanks a lot!* While your solution doesn't solve the shapes problem I was running into, I was able to create a "reasonable' solution to my problem--and, more importantly, one that should be acceptable to the office. I still don't know why the shapes option (embedding previously used draft and file copy .jpg images) doesn't work, and I'll continue to look into it.
    But for now, I'll go with your help and hope that will make everybody happy.

    Thanks again,
    Jeff

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Frustration Level Exceeded! W2K Shape Issue

    Hi Jeff

    I know this is alittle after the event but I've worked on this in the past.
    working with shapes/images in the header/footer area or anywhere in a doc is fiddley. please find my attached code as this may help you.

    Diana

Posting Permissions

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