S
snixtor
I've got a custom HTML editor that I'm using Word interop to perform
spell checking. I'm getting the HTML into Word via clipboard copy /
paste using the method "PasteSpecial". Ordinarily this has worked
fine, but recently I've had reason to edit the content of the HTML
before pasting it into Word, that is, removing image tags before
sending it for a spell-check, because Word (2007) modifies the image
tags and makes them invalid for my application. The trouble is, as
soon as I edit out the image tags, PasteSpecial no longer functions
properly, throwing the error "Command Failed". Similarly, if I just
cobble together a bit of HTML manually (with much less metadata than
normally generated) and send it to Word via PasteSpecial I get the
same error.
What could be causing this? When I'm stripping the img tags the HTML
I'm sending to Word looks pretty standard, the only difference is the
img tag is pulled out, but somehow that upsets Word.
spell checking. I'm getting the HTML into Word via clipboard copy /
paste using the method "PasteSpecial". Ordinarily this has worked
fine, but recently I've had reason to edit the content of the HTML
before pasting it into Word, that is, removing image tags before
sending it for a spell-check, because Word (2007) modifies the image
tags and makes them invalid for my application. The trouble is, as
soon as I edit out the image tags, PasteSpecial no longer functions
properly, throwing the error "Command Failed". Similarly, if I just
cobble together a bit of HTML manually (with much less metadata than
normally generated) and send it to Word via PasteSpecial I get the
same error.
What could be causing this? When I'm stripping the img tags the HTML
I'm sending to Word looks pretty standard, the only difference is the
img tag is pulled out, but somehow that upsets Word.