Macro on web

Y

Yama

Hi,

1.. Can we utilize a Word document with a macro from a web page?
2.. Can we pass parameters (like ID # and letter type) from a web page or
do we have to prompt using VBS within the document?
If the answers question number 2 is yes how can we accomplish that?

We probably will need to reference an OBJECT tag or have a CreateObject:
<script language=vbscript>
Sub GetDoc()
Dim wdObj '--// As Word.Application
Dim wdDoc '--// As Word.Document

Set wdObj = CreateObject("Word.Application")
wdObj.Visible = True
Set wdDoc = wdObj.Documents.Open("c:\mydoc.doc")

wdDoc.Application.Run "myFunc", CStr(Textbox1.Text)
End Sub

In the document:
Public Sub myFunc(ByVal strID As String)
MsgBox(strID)
End Sub

But the above does not work....

HELP!

Yama
 
C

Cindy M -WordMVP-

Replies already posted to duplicate question in another
group!

Cindy Meister
 

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