Hi =?Utf-8?B?YnBzbWljcm8=?=,
> From a user perspective, I can copy a blob of HTML from somewhere and paste
> it into a Word document (Word 2003 in this case), and all the formatting is
[quoted text clipped - 6 lines]
> the clipboard and use the Range.Paste method, but that approach just seems so
> lame to me.
Yes, that's what you'd need to do. Or write it to a file then use InsertFile.
Problem is, Word requires a converter to turn HTML into Word document binary.
And converters are only available through Paste or when opening a file.
What you could do is transform the HTML into valid WordProcessingML, then use
the InsertXML command. Word does do WordProcessingML to binary in the object
model.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)
bpsmicro - 19 Sep 2006 13:58 GMT
<groan>
Well I did some Googling and it looks like I'd have to spend a bunch more
time than I have designing and writing an HTML->WordProcessingML from scratch.
The InsertFile approach looks promising though. And I found that if I
specify the Link parameter as true to insert it as an INCLUDETEXT field then
from then on I only need to call Update on the field that's created and it'll
update any "behind-the-scenes" changes to the file I maintain. I think I'll
proceed with that approach.
Many thanks;
Brad.
> Hi =?Utf-8?B?YnBzbWljcm8=?=,
>
[quoted text clipped - 17 lines]
> the InsertXML command. Word does do WordProcessingML to binary in the object
> model.