How can I embed a file by dragging and dropping?

M

mattbrent

I need to be able to embed files as icons in Word documents. This is straight
forward by using the 'copy' and 'paste special' options, but I do a lot of
it, so I'd like to be able to drag and drop files and have them appear as
icons. Currently I can drag and drop a file into a word doc (eg. a pdf
document), but the file opens when it's pasted into word. What I'd like is to
be able to drag and drop and have the file appear as an embedded file,
represented by the appropriate icon. Anybody got any ideas?

Thanks!
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?bWF0dGJyZW50?=,

I don't know of any way to change the behavior. But maybe Insert/Object/From
File would be more efficient than copy/paste?

Possibly, you could even set up a little macro to loop through a folder, or feed
it a list of file names.
I need to be able to embed files as icons in Word documents. This is straight
forward by using the 'copy' and 'paste special' options, but I do a lot of
it, so I'd like to be able to drag and drop files and have them appear as
icons. Currently I can drag and drop a file into a word doc (eg. a pdf
document), but the file opens when it's pasted into word. What I'd like is to
be able to drag and drop and have the file appear as an embedded file,
represented by the appropriate icon. Anybody got any ideas?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
T

Tony Jollans

When I drag and drop files into a Word document they appear as icons - and I
can't see any way to change it.
 
C

Cindy M -WordMVP-

Hi Tony,
When I drag and drop files into a Word document they appear as icons - and I
can't see any way to change it.
Interesting... I just tested again, to make sure, and Word (2003) definitely
inserts the file, not an icon.

My guess, then, is that this is something controlled with a Registry setting
(that perhaps can be set in Tools/Folder Options via Windows Explorer).
However, a quick look in there doesn't reveal anything.

If I try to drag a non-textfile type in (an Access database, say), then I get
an icon. But if you double-click a document it does open in Word, doesn't it
(IOW, Word is correctly recognized by Windows, otherwise)?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
T

Tony Jollans

Hi Cindy,

I've just done a bit more checking and, yes, it does depend on the document
type, but I'm not entirely sure what's happening.

Some types - bmp, jpg - just expand and are included in the doc as images

Some types - doc, xls, ppt - expand to show some of the contents, opening
the appropriate app in the process - and create an EMBED field e.g. { EMBED
Excel.Sheet.8 }

Some types - htm, js, assorted exe's - just show icons and are { EMBED
Package } fields

Some types - zip, txt - show file names, but no icon (in 2003 - but seem
more normal in 2000 - I think I must have something funny in my setup as the
correct icon does show if I edit the Package) and are, again, { EMBED
Package } fields

One type - pdf - which the OP asked about - acts like it's going to expand
the file in that it opens acrobat but then shows an icon. An { EMBED
AcroExch.Document } field is created. If I keep acrobat open in the
background it makes the process fairly quick.

Yes, my Word is correctly registered with Windows.
 
C

Cindy M -WordMVP-

Hi Tony,
I've just done a bit more checking and, yes, it does depend on the document
type, but I'm not entirely sure what's happening.
OK, based on your results, my best guess is

When you drag something into Word, Insert/Object/From file kicks in in the
background. And you essentially get the default result from that. Again, why
on your installation this would be an icon for a Word document is a mystery to
me...

As to what happens for a PDF file, I'm guessing this may well have something
to do with which application is assigned as the default for the PDF file type.
This could very well be different from installation to installation. And then
whether it opens or embeds as an icon is probably a function of how THAT
application is registered to deal with the "open" command.

(Which brings me back to *.doc on your system: any chance this is registered
to something other than Word, such as WordPad?)
Some types - bmp, jpg - just expand and are included in the doc as images

Some types - doc, xls, ppt - expand to show some of the contents, opening
the appropriate app in the process - and create an EMBED field e.g. { EMBED
Excel.Sheet.8 }

Some types - htm, js, assorted exe's - just show icons and are { EMBED
Package } fields

Some types - zip, txt - show file names, but no icon (in 2003 - but seem
more normal in 2000 - I think I must have something funny in my setup as the
correct icon does show if I edit the Package) and are, again, { EMBED
Package } fields

One type - pdf - which the OP asked about - acts like it's going to expand
the file in that it opens acrobat but then shows an icon. An { EMBED
AcroExch.Document } field is created. If I keep acrobat open in the
background it makes the process fairly quick.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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