PasteSpecial dataType:=wdPasteHTML

  • Thread starter Thread starter Antonhino
  • Start date Start date
A

Antonhino

I have made a code which copy a text from a xml file and paste it into
word.
But when the text is a serie of ten same letters like 'aaaaaaaaaa', the
string pasted is a number '0000000105'. What can I do to avoid this?

Here is my code.


' copy HTML string to clipboard
PutHTMLClipboard (myStr)

ActiveDocument.Bookmarks.Add "startHTMLCopyPasteBmk",
Selection.Range

' paste it into Word doc
On Error GoTo error
Selection.PasteSpecial dataType:=wdPasteHTML




Thank you for your help.
 

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