Link to home
Start Free TrialLog in
Avatar of Mutley2003
Mutley2003

asked on

Word .. using drag drop to INSERT a doc file (from a Delphi app)

This is perhaps not quite as straightforward as it seems.

If I have a Word document (W1.doc) open, Insert|File  from the menu gives me the behaviour I want .. the contents of the specified file are inserted and all the styles (including the style "classes". those things in the drop down list under "Normal") are preserved. The inserted file becomes a seamless part of the current document (W1.doc).

So far so good. But if I drag fred.doc from say winzip (ie fred.doc is in mydox.zip) to W1.doc then Word treats this as an "embedded" and repositionable object, sort of  like being in a frame. You can still edit that object OK, and the styles are there but ONLY in that object.. so to change a style in the embedded object you have to double click on it which opens another instance of word. This means that you cannot do global style changes across embeds.

What I would like is to be able to drag fred.doc from my app (say a database of .doc files) and have the drop in Word interpreted as an insert.

Avatar of Lee_Nover
Lee_Nover

if using OLE d&d then specify a rich format excluding the file format from the supported formats
I have no clue what formats word docs support
Avatar of Mutley2003

ASKER

sorry Lee, I don't follow. OK, I can set some format to "fool" Word (is that what you are saying?), but then presumably Word won't recognize the drop?
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
tnx .. I'm really interested in what you've come up with