Results 1 to 11 of 11
  1. #1
    Lounger
    Join Date
    Aug 2003
    Location
    Baltimore, Maryland, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    paste special as metafile (2000 SR1)

    We work on documents with many graphics and illustrations. Most are done in PowerPoint and some contain pictures (some jpgs, some tifs). We copy these into Word either as pictures or pictures (enhanced metafiles). Enhanced metafiles keep the size of the word document down -- pictures blow it way up. The problem is the metafiles don't appear where you expect them to and once you select "In line with text", you sometimes have to go back a page or ahead a page to find it. One of our users doesn't want to use metafiles for this reason because its confusing and slows her down.

    Is there any way to keep an enhanced metafile from drifting off ? You would think it would anchor itself near where you had your cursor, but it most often doesn't.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: paste special as metafile (2000 SR1)

    You could make a macro available:

    Sub PasteAsMetafile()
    On Error Resume Next
    Selection.PasteSpecial DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine
    End Sub

    Users can assign it to a toolbar button and/or keyboard shortcut. The macro will paste the picture on the clipboard inline (i.e. non-floating) at the position of the selection/insertion point as an enhanced metafile. The On Error Resume Next is used to avoid error messages if the clipboard is empty, if no document is open etc.

  3. #3
    Lounger
    Join Date
    Aug 2003
    Location
    Baltimore, Maryland, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    Thanks ever so much!

  4. #4
    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: paste special as metafile (2000 SR1)

    Pictures don't need to take up a lot of space. If you select a picture and press Shift+F9 and get a field code (e.g., EMBED MSPaint) then you have not only picture data but unnecesary OLE data. Press Ctrl+Shift+F9 to unlink the OLE field to a plain picture and you'll save a lot of disk space.

  5. #5
    Lounger
    Join Date
    Aug 2003
    Location
    Baltimore, Maryland, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    Hate to say this, but I tried the macro yesterday and it didn't work. Metafiles still came in floating and didn't always go where they should. I positioned my cursor in front of a para return where I wanted it to go and it ended up in a cell in the table below where I wanted my graphic. I tried several times in several places and I ended up having to take my view down to 50% so I could find the metafile and drag it where I wanted it -- most of our docs have a lot of graphics so its not always immediately apparent. Thanks for your time.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: paste special as metafile (2000 SR1)

    I can't explain why the metafiles would come in floating - the code in the macro explicitly pastes them inline:

    ..., Placement:=wdInLine

    I have been using a variant of this macro without problems for about 8 years now, starting with Word 95, later 97, now 2002/XP. I'm sorry that it didn't work out for you.

  7. #7
    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: paste special as metafile (2000 SR1)

    Does Word 2000 support PNG? From a little test of grouped clip art, drawing elements and text, it seems to be a winner. On the other hand, when the original was a photograph, JPG seems best. Both paste "inline," while the others I tried float the graphic.
    Attached Images Attached Images

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    Hi Hans:
    Out of curiosity, I tried your code in Word 2000 & found that it wouldn't paste at all. However, when I check under Edit/Paste Special, I find that the only options are bitmap & Device independant bitmap.

    Then I tried it with a portion of an Excel spreadsheet, but it pasted it floating. I wonder if there's a setting somewhere that affects it.

  9. #9
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    Edited by Phil Rabichow to make the screen with narrower & to make the link clickable - see Help #19
    Hi Nancy,

    I noticed that back in July you posted a request for Pasting Metafiles. I too just posted looking for the same answer. I found your letter and the resulting thread just after I posted. Anyway, I too received a reply from HansV and it didn't work for me either. HOWEVER, the good news is, I did manage to find a fix for Hans' code. Simply changing one option in the code he gave me, fixed the problem!! Check out my <post#=398600>post 398600</post#>

    For that matter, I may as well post it here too! Naturally, you needn't include the commented line, but I left it in for reference so you can see what I changed. Hope this works for you.

    <pre>Sub PasteAsMetafile()
    Selection.PasteSpecial DataType:=wdPasteMetafilePicture, _
    Placement:=wdInLine
    'Selection.PasteSpecial DataType:=wdPasteEnhancedMetafile, _
    Placement:=wdInLine
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.InlineShapes(1).LockAspectRatio = msoTrue
    Selection.InlineShapes(1).Width = InchesToPoints(6.5)
    End Sub
    </pre>


    Drew

  10. #10
    Lounger
    Join Date
    Aug 2003
    Location
    Baltimore, Maryland, USA
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    Thanks a lot for this. I just had a chance to try it out and it works wonderfully! I did have to take out the line "Selection.InlineShapes(1).Width = InchesToPoints(6.5)" because it distorted a small graphic that was only 3.5 inches wide - enlarged it to 179% wide and 100% tall. Tried without that line and it reduced a graphic that was 15.5 in wide 84% overall - aspect ratio was locked. This will be a terrific timesaver.

  11. #11
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: paste special as metafile (2000 SR1)

    HI Nancy,

    Glad it worked out for you. I'm sorry about that extra line of code in there for the size. That is a step that I had to perform manually each time. I use this macro for placing Excel charts into my reports which are in Word. I had the same issues you were having when placing a clipboard image in as an Enhanced Metafile. Since my charts are always 6.5" wide, I included that extra line, which you obviously did not need.

    Drew

Posting Permissions

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