Word scripting problem

C

chris

Hi all,

I am trying to figure out how to write some string "as HTML" In word using
vbscript. For instance, if you copy some formatted html from IE and then do
a past in word, it shows up as Formatted HTML with the tags rendered
properly. I want to manually build an HTML string and render it to the
document so that it displays as rendered HTML and not the "<tag> text <tag>"
raw HTML.


I am stuck on this for quite some time. I am building the word document
programmatically on the client using vbscript and cannot seem to get this
last bit working. I've scoured VBA articles(I've mostly ported VBA examples
to vbscript for the project so far).

Any help GREATLY appreciated!

Thanks,

Chris
 
J

Jezebel

Why are you trying to do this by creating HTML strings? VBScript gives you
access to the Word object with all the methods for inserting and formatting
text already there. Why reinvent the wheel?
 
C

chris

Because html is being imported from a database via my script. So the
strings already have HTML in them,but I can't get it into the word document
with script so that it mainttains the HTML.


For instance, if:

<B> Bold text here </B> is in the database, how can i write it to the
document so that word renders the html tags.(the way it does if you copy and
paste some html formatted text from a browser and paste it into word...it
shows up as formatted html in the word document.). I can only get it to
display as raw html, unrendered.
 

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

Top