Hello fellow sufferers.
I am trying to get HTML over to MS-Word. I have got as far as having the complete HTML code extracted from a RichText field into a single string. The idea is to send this HTML to Word using a word template. I have managed to get the HTML code over to word, but word shows the HTML script and does not the interpreted code when I try this here:
WordObject.Selection.TypeText(sub_html_code)
…which I understand. Then I found others do it via the clipboard which I got to work by copying the string to the clipboard and then instruct word to paste from the clipboard but unfortunately with the same result - showing the code…
Call WordObject.Selection.PasteSpecial
Further reading through forums and MS VB documentation got me to some parameters of the PasteSpecial method and excactly here is the struggle. Those guys using native VB can do wonderful things like:
Obj.PasteSpecial , , , , wdPasteHTML
or
Selection.PasteSpecial dataType:=wdPasteHTML
Well I have tried numerous syntax variations but non of them seem to work resp. Word does either answer back with error messages or simply ignores everything. Still I am sure from reading through the documentations, that if I manage to get the parameter “wdPasteHTML” in place everything will be fine. But how??
Has anyone managed to these parameters used by VB to work in LS?
Any help or idea would be appreciated a lot!