Default Image Paste NOT Bitmap

H

Helena K

Hello,

Is anyone aware of a way in which i can chage the default paste option in
Word from bitmap to Picture(Enhanced Metafile).
Alternatively does anyone have a macro for cut->paste
special->picture(Enhanced Metafile)->resize that actually works.
I have recently upgraded to Office 2003 and maintain/update screen captures
in technical documents. Files that used to remain at 3MB before/after updates
have now jumped up to 15MB. I have to go through the whole document manually
doing the cut->paste special->picture(Enhanced Metafile) to ge the file size
back down. Too much clicking is causing RSI in my shoulder which i fear may
impede on my surfing this summer.

Hope someone can pls help.

Thanks,

Helena
 
J

Jezebel

Best approach (that I've found) is to prepare the graphics using a graphics
editor. Crop, set the finished size and resolution, and do any other graphic
enhancement called for. Then save the graphic as a file. Then import (or
link) the graphic. Never paste a graphic directly into Word, and try to
avoid ANY manipulation of the graphic once it's there. Especially, do not
resize a graphic after you've put it into Word.

This has several advantages --

1. It minimises the problem of the document size blowing out.

2. You get better image quality.

3. You have a separate backup of the graphic files, in their native format.
Particularly for technical documents, you don't want to rely on the Word
document as the sole repository of your graphics. It's REALLY embarrassing
to have to go back to your client and tell them that you've lost all the
graphics because the document crashed.
 
H

Helena K

Thanks Jezebel,

Id like to avoid using a second program to maintain my graphics (mainly
screen dumps). Some of my documents have over 100 images so this puts quite a
bit of overhead on manipulating the images.
Im just trying to make my job easier (a monkey can cut and paste special).
Really, i was hoping word could do the work for me somehow.
Either:
-Default Paste Special
-Fancy Macro
About files crashing, this aint an issue ... i have necessary backups etc :)

Still searching ...

Helena
 
D

DA

Hi Helena

I've often cursed about Word's shortcoming in this regard
and ended up writing a macro that allows me to set the
default paste format depening on different clipboard
formats.

Two options :
1) I don't know if you're familiar with macros and VBA.
If you like I can post some code to show you a solution;
or

2) I can send you a copy of my VBA code modules which you
can incorporate into a template or word document.

Dennis.
-----Original Message-----
Hello,

Is anyone aware of a way in which i can chage the default paste option in
Word from bitmap to Picture(Enhanced Metafile).
Alternatively does anyone have a macro for cut->paste
special->picture(Enhanced Metafile)->resize that actually works.
I have recently upgraded to Office 2003 and
maintain/update screen captures
 
H

Helena K

Hi Dennis,

Thanks for your response. My tech proficiency is in COBOL but used to muck
around with a lil VB so am trying to write a macro. Im not too familiar with
the classes but so far i have the following which converts to a Pic(enhanced
Metafile) inline with text:

Sub MetaPic()

If Selection.Type = wdSelectionInlineShape Then
Selection.Cut
Selection.PasteSpecial Placement:=wdInLine,
DataType:=wdPasteEnhancedMetafile
Else
MsgBox "Please Select a picture ... Thnx, Hels."
End If

End Sub

Im stuck on the resizing of the object. After i use the paste special
method, the selection is no longer active. I cant find the relevant resize
class. Would be great if you could provide some code. Also if you have any
other VBA modules that might be handy it'd be muchly appreciated.

Regs,

Helena
 
J

Jezebel

Your current code is actually not doing anything. Once the image is in Word
it is stored, internally, as a WMF anyway, regardless of its original
format. The paste special options relate to how Word interprets the contents
of the clipboard, not how the graphic is handled after pasting. So selecting
a graphic within Word, copying, and pasting back, has no effect (other than,
in some cases, to degrade the image. Obviously it can never improve it!).

To set the size, you can use something like ...

With Selection.Inlineshapes(1)
.Width = ....
.Height = ....
End with
 
H

Helena K

Hi Jezebel,

I beg to differ on your last note. Perhaps you could provide a more
technical explanation as to how i could verify the format of the embedded
file that it was actually a wmf (not BITMAP) to start with.

Otherwise, all i have to go off is that when i do a default paste of a
standard screen shot, the file size increases by say roughly 44kb. After
cutting the image and repasting as a Pic(Enhanced Metafile) the image size is
roungly 30kb - 2/3rds original size (and this is with maintaining the
original height/width).

Oh yeah, i got the resizing to work but had to calculate the height to width
ratio manually as the LockASpectRation method didn't seem to work.

Anyways, how is the weather in the PST time zone and where is it? And if you
could provide more detail on the formats of embedded picture in word it would
be appreciated.

Regards,

Helena
 
J

Jezebel

This is roughly how the clipboard works: When you copy something, the
copying application puts the information into the clipboard object in one or
more formats, according to the application, the type of selection, etc --
that is, the clipboard object holds mutliple versions of the same original.
When you Paste, the pasting application selects the appropriate format, or,
if it can deal with more than one format it may give you a list of the
available formats and let you choose.

This is what happens when you select PasteSpecial -- the list of options is
precisely the list of available formats in the clipboard, that Word is
capable of dealing with. Experiment by copying from different kinds of
source: eg, if you copy from Notepad you'll get Unformatted Text and
Unformatted Unicode Text. This is determined by Notepad, not by Word. The
choice determines what happens at the time of pasting, but has no residual
effect -- after pasting, it's just text in the document.

Similarly with graphics. If you open a drawing in PhotoShop and copy it, the
PasteSpecial options are those provided by PhotoShop -- object, picture,
bitmap, device independent bitmap. Corel, on the other hand, doesn't give
you plain bitmaps, so that option isn't shown for the same graphic copied
from Corel. And see what happens if you copy a graphic within Word, then
paste special.

The PasteSpecial options refer only to what's in the clipboard and the
method for getting from there into the document. They have nothing to do
with what happens afterwards. (Some formats convert better than others,
which is why the choice matters.) But after pasting it's just a graphic in
the document. Have a look at the Word object model and the available
properties for Shape objects. There are no properties that determine graphic
format such as bitmap vs WMF. PictureFormat holds the settings you can
change from the Picture Toolbar; OLE_Format refers to embedded objects
rather than graphics; Type refers to the type of shape, not its content.


PST is Pacific Standard. Mid-summer: very hot and very dry, like christmas
is meant to be.
 
H

Helena K

Coolness, thanks for all the info. Excellente!

I still think MS Word maintains some details as to the format of the image,
whether not easily available to us commoners. At the least the PasteSpecial
Method is internally adjusting the resolution of the image, thus giving
different file sizes. Pic(Enhanced Metafile) will do for now.

EST is likewise humid ... Christmas where the gumtrees grow, there is no
frost and there is no snow ...

H
 
J

Jezebel

One feature you might notice: Word expects images to be at 96 dpi. If the
image is at some other resolution, Word scales it accordingly. IE, if your
image is 5 cm wide at 300 dpi, then when first pasted it will a bit over 15
cm wide (5 x 300/96).
 
H

Helena K

So what happens when you resize an image? Is it also resampled to maintain
the 96dpi standard? Im guessing 'no' as word still maintains details with
respect to the original file size. So in the case that we decrease the width
and height (resize) after initially pasting the image, are we correspondingly
increasing the dpi? relative to the display size.

So can we then resample the image at a given width/height?
 
B

Bob Buckland ?:-\)

Hi Jezebel,

Ummm, well, while the default setting in Word for
pasting graphics is 96 ppi it can be changed to
almost any value between 72ppi and 420 ppi using
Tools=>Options=>General=>[Web Options], but, that
setting is usually only applied by Word if the
graphic does not contain a PPI value in the graphic.
When the graphic does contain that value, Word tries
to honor it.


=====
One feature you might notice: Word expects images to be at 96 dpi. If the
image is at some other resolution, Word scales it accordingly. IE, if your
image is 5 cm wide at 300 dpi, then when first pasted it will a bit over 15
cm wide (5 x 300/96).>>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

Office 2003 Editions explained
http://www.microsoft.com/uk/office/editions.mspx
 
B

Bob Buckland ?:-\)

Hi Helena,

To add a bit to Jezebel's reply. When certain file format
graphics are inserted in Word a duplicate, in WMF format,
may also be stored in the document, but you can also choose
to tell Word not to do that.
http://support.microsoft.com/default.aspx?scid=kb;en-us;224663&FR=1

Word may retain some information on the
original graphic. You may also find the package here to be of use:
http://www.lebans.com/msword.htm

=======
Coolness, thanks for all the info. Excellente!

I still think MS Word maintains some details as to the format of the image,
whether not easily available to us commoners. At the least the PasteSpecial
Method is internally adjusting the resolution of the image, thus giving
different file sizes. Pic(Enhanced Metafile) will do for now.

EST is likewise humid ... Christmas where the gumtrees grow, there is no
frost and there is no snow ...

H>>
--
Let us know if this helped you,

Bob Buckland ?:)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

Office 2003 Editions explained
http://www.microsoft.com/uk/office/editions.mspx
 
J

Jezebel

No, it's not resampled. It retains the original amount of information,
distributed over whatever size you tell you it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top