I have two questions regarding the PasteSpecial method:

1.) I would like to paste the contents of the clipboard as a "Picture (Windows
Metafile)" to the active cell of a table in Word using VB. The code below is
straight out of the VB help examples. It works if the selection is not inside a
table but if the selection is inside a table it does not work. If I record the
actions of paste special to a cell the code generated uses PasteAndFormat, but
this does not allow me to specify "Picture (Windows Metafile)". What is the
solution?

Selection.Collapse Direction:=wdCollapseStart
Selection.Range.PasteSpecial datatype:=wdPasteMetafilePicture

2.) To reduce Word document file size I have always pasted graphics (charts,
etc.) as "Picture (Windows Metafile)" rather than "Picture (Enhanced Metafile)"
believing that the former is smaller in size than the latter. Is this true?

Thanks
Alex

Windows metafile versus enhanced metafile by DA

DA
Sun Jul 11 20:56:02 CDT 2004

Hi Alex

(see comments below)

All the best,
Dennis

>-----Original Message-----
>I have two questions regarding the PasteSpecial method:
>
>1.) I would like to paste the contents of the clipboard
as a "Picture (Windows
>Metafile)" to the active cell of a table in Word using
VB. The code below is
>straight out of the VB help examples. It works if the
selection is not inside a
>table but if the selection is inside a table it does not
work. If I record the
>actions of paste special to a cell the code generated
uses PasteAndFormat, but
>this does not allow me to specify "Picture (Windows
Metafile)". What is the
>solution?
>
> Selection.Collapse Direction:=wdCollapseStart
> Selection.Range.PasteSpecial
datatype:=wdPasteMetafilePicture
>

If you try something like this, you should get your paste
to work:

Selection.Copy
ActiveDocument.Tables(1).Cell(1, 1).Range.PasteSpecial _
DataType:=wdPasteMetafilePicture


>2.) To reduce Word document file size I have always
pasted graphics (charts,
>etc.) as "Picture (Windows Metafile)" rather
than "Picture (Enhanced Metafile)"
>believing that the former is smaller in size than the
latter. Is this true?

Basically true, the Enhanced Metafile format is a 32-bit
superset of the 16-bit Windows Metafile.

>
>Thanks
>Alex
>
>.
>

Re: Windows metafile versus enhanced metafile by Alex

Alex
Mon Jul 12 01:16:53 CDT 2004

Thanks Dennis, that worked perfectly.

DA wrote:
> Hi Alex
>
> (see comments below)
>
> All the best,
> Dennis
>
>
>>-----Original Message-----
>>I have two questions regarding the PasteSpecial method:
>>
>>1.) I would like to paste the contents of the clipboard
>
> as a "Picture (Windows
>
>>Metafile)" to the active cell of a table in Word using
>
> VB. The code below is
>
>>straight out of the VB help examples. It works if the
>
> selection is not inside a
>
>>table but if the selection is inside a table it does not
>
> work. If I record the
>
>>actions of paste special to a cell the code generated
>
> uses PasteAndFormat, but
>
>>this does not allow me to specify "Picture (Windows
>
> Metafile)". What is the
>
>>solution?
>>
>> Selection.Collapse Direction:=wdCollapseStart
>> Selection.Range.PasteSpecial
>
> datatype:=wdPasteMetafilePicture
>
>
> If you try something like this, you should get your paste
> to work:
>
> Selection.Copy
> ActiveDocument.Tables(1).Cell(1, 1).Range.PasteSpecial _
> DataType:=wdPasteMetafilePicture
>
>
>
>>2.) To reduce Word document file size I have always
>
> pasted graphics (charts,
>
>>etc.) as "Picture (Windows Metafile)" rather
>
> than "Picture (Enhanced Metafile)"
>
>>believing that the former is smaller in size than the
>
> latter. Is this true?
>
> Basically true, the Enhanced Metafile format is a 32-bit
> superset of the 16-bit Windows Metafile.
>
>
>>Thanks
>>Alex
>>
>>.
>>