Word .. using drag drop to INSERT a doc file (from a Delphi app)
Posted on 2004-11-22
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.