View Single Post
  #4   Report Post  
Jean-Guy Marcil
 
Posts: n/a
Default

JethroUK© was telling us:
JethroUK© nous racontait que :

it specifies other picture types (jpegs, bitmaps,etc) - but not which
type of picture as defined by pastespecial/'picture' - i think it's
metafile


The definition is:

PasteSpecial(IconIndex, Link, Placement, DisplayAsIcon, DataType,
IconFileName, IconLabel)
The datatype is the one you want.

The problem is that the available DataTypes depend on the clipboard content.
If the clipboard contains a picture, you can use "15" as DataType to paste a
JPEG format. But if the clipboard contains text, this DataType will generate
an error. The metafile format (wdPasteMetafilePicture or "3") always works,
I think, regardless of the clipboard content. So if you cannot control what
a user has put in the clipboard, then use that DataType. Otherwise, you have
to check the clipboard content, then, based on the content, use a different
DataType. If you need to go that way, let us know, code to test the
Clipboard content can be posted. But first, ask yourself if you really need
to specify the picture type in Word....

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org