selection.pastespecial

  • Thread starter Thread starter Venkat
  • Start date Start date
V

Venkat

Hi,

I have text in clipboard which is in html format(like <b>This is blld
</b>).I want to diapy it in word using selectio.pastespecial
datatype:=wdpastehtml. But i am getting error when i run this code.Please
help me to display data which is html format into word.

Thanks,
Venkat
 
If the clipboard contents actually contain HTML formatting tags, these will
be pasted as such in Word, even if you paste as HTML. You would have to use
Find and Replace to format the text in bold and to get rid of the tags.

Note that if the code gives you an error message, that could happen on an
occasion when the clipboard is empty. Adding the line On Error Resume Next
to the code should take care of that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top