By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

Passing A Filename

P: n/a
<script type="text/vbscript">
Dim objWord
Sub Btn1_onclick()
call OpenDoc("K:\Deloitte\Team1 Status report\JavaPrograms\hi.txt")
End Sub

Sub OpenDoc(strLocation)

Set objWord = CreateObject("Word.Application")
objWord.Visible = true
objWord.Documents.Open strLocation
End Sub
</script>
I would like to pass the filename used above in the button code below so
the above code could be coded only once and then mutiple button code
could be used.

<td><INPUT TYPE=BUTTON NAME=Btn1 VALUE="Requirements Template"></td>

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lee
rockocubs said:

<script type="text/vbscript">


This is a Javascript newsgroup. There's a Microsoft group somewhere that covers
vbscript.

Jul 23 '05 #2

P: n/a
This question started out as a javascript question last week and the
answer and example i was given was in VBscript that is why i posted here,
also there is no vbscript room on ths forum, so my apolgies if i offended
someone.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.