Inserting Raw HTML into a Word source Document

  • Thread starter Edward Thrashcort
  • Start date
E

Edward Thrashcort

I want to add a popup script to a Word 2003 document so that when it's saved
as HTML, I can invoke a popup via a "javascript:mypopupScript()" hyperlink.

I have managed to do this manually using the Microsoft Script Editor BUT....
here's the real problem.... I want to do this programmatically using VBA.

I can open the script editor using ActiveDocument.HTMLProject.Open but I
can't figure out how to execute commands within the script widow.

I've looked at the Help but there does not appear to be any methods to do it

Can somebody PLEASE tell me what I am missing?

Is there another way of doing this?

Eddie
 
E

Edward Thrashcort

OK I have figured out a more intuitive way of doing it

1. Save document as html

2. Open the document as a text file
Documents.Open FileName:="MyFile.htm", Format:=wdOpenFormatText

3. Edit the document in raw txt

4. Save the file

Eddie
 
E

Edward Thrashcort

Is there a way that a user can insert raw html into a document body (eg by
designating it as a particular paragraph style which is invisible in the DOC
but written to the HTML file?

I want to be able to put inline HTML anchors into a document....eg

<a name="inline_link">

so that it can be linked-to by an external HTML file after the document has
been saved as HTML ...eg

<a href="myexportedfile.html#inline_link>Goto My Inline Link</a>

Eddie
 
E

Edward Thrashcort

Yes I think you are, Eddie. Perhaps this is the wrong forum to ask in?

Eddie
 

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