I need help

Results 1 to 3 of 3

Thread: I need help

  1. #1
    Join Date
    Dec 1969

    Default I need help

    Hi, I really need help on this one. My situation is this:<BR>- I have ASP page which queries a database<BR>- Instead of outputting the query using the usual Request.write recordsetXYZ("FieldName") to the ASP page, I want to output to MS Word<BR>- More specifically, I need to output to the Client manchine&#039;s copy of MS Word<BR><BR>- I do this by opening MS word on Client using Client-side VBCsript<BR>&#060;Script&#062;<BR>Set WordApp = CreateObject("Word.Application")<BR>WordApp.Applic ation.Visible = True<BR>WordApp.Documents.Add <BR><BR>and printing<BR>WordApp.Selection.TypeText "Hello"<BR>&#060;/Script&#062;<BR>But...<BR>How do I get the value of the recordset (Server-Side ASP) into the Client-SideVBScript???<BR><BR>I don&#039;t know, but if anyone can help, please let me know.Thanks in advance<BR>jimmy<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: I need help

    I&#039;m not sure on this, but try putting the recordset(Server-Side ASP) into a variable and use the variable in the client side vbscript.<BR><BR>temp = &#060;%=strTest%&#062;<BR><BR>and use this in your Vbscript.

  3. #3
    Join Date
    Dec 1969

    Default Easier way

    There is an easier way to accomplish what you are trying to achieve that should be more cross browser compatible.<BR><BR>Format the word doc as necessary using response.write and generating html, tables etc<BR><BR>On top of page do<BR>&#060;%<BR>Response.ContentType = "application/vnd.ms-excel"<BR>response.Expires = 0<BR>response.ExpiresAbsolute = Now() - 1<BR>response.addHeader "pragma","no-cache"<BR>response.addHeader "cache-control","private"<BR>Response.CacheControl = "no-cache"<BR>Response.Buffer = True<BR>Response.ContentType = "application/msword"<BR>%&#062;<BR><BR>&#060;%Code to write out word doc format as necessary in html%&#062;<BR><BR>The result fo ie users with office97+ will be to open the word doc within an active x word shell within the browser, can edit save etc do all word commands from here. For other users should get download window.<BR><BR>Hope this helps

Posting Permissions

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