asp with Word

Results 1 to 2 of 2

Thread: asp with Word

  1. #1
    Join Date
    Dec 1969

    Default asp with Word

    I am trying to open links from asp page in Microsoft Word. By defauly any link is opened in IE.<BR>I have reached some code that already opens the links in Word:<BR><BR>sub file<BR>Dim word <BR>Dim doc <BR>Set word = CreateObject("word.application")<BR>word.Documents .add "http://QAForms/qaforms/"&rs("FileName")&"", false<BR><BR>word.Visible = True<BR>end sub<BR><BR>This sub is client side, and I am getting the file pathes from a server side script, but I could not use server side inside client side script<BR><BR>So I want when clicking on the names which comes from a database to call the sub and open the file in word <BR>can anyone help <BR>Please note that the rs("filename") is generated through looping the recordset as I have more than a file in the database.

  2. #2
    Join Date
    Dec 1969

    Default RE: asp with Word

    &#060;%="&#060;scri" & "pt" language=&#039;VBScript&#039;&#062;" & vbcrlf%&#062;<BR>sub file<BR>Dim word <BR>Dim doc <BR>Set word = CreateObject("word.application")<BR>&#060;% do while rs.eof = false %&#062;<BR>&#060;%="word.Documents.add " & Chr(34) & "http://QAForms/qaforms/"&rs("FileName")& Chr(34) & ", false" & vbcrlf%&#062;<BR>&#060;% rs.movenext %&#062;<BR>&#060;% loop %&#062;<BR>word.Visible = True<BR>end sub<BR>&#060;%="&#060;/scri" & "pt&#062;"%&#062;<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts