Results 1 to 3 of 3

Thread: Handling Arrays in ASP

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    7

    Wink

    Hi Folks,

    My problem goes like this. I would like to check
    grammar/synonyms and run a spell check on a text
    field in an asp page. This, i am doing by creating
    an instance of WORD.APPLICATION and accesing
    its objects/members.

    Consider the following script :

    dim li
    dim a
    dim m
    set w=createobject("Word.application")
    set doc=w.documents.add
    li= w.SynonymInfo("BIG").SynonymList(1)

    Synonymlist returns an array of strings. But when
    i try to access the array like,

    msgbox li(1)

    it gives my a 'type mismatch' error. I'v tried out
    all sorts of possibilities but still this is still bugging
    me.

    U must also consider that this script is working
    perfectly if it is executed thru a component.
    Only when u access it through asp script does
    it give u an error.

    Help me out folks...!!!!

  2. #2
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Arrow Hmm...

    I am not really sure, but maybe you need to include a .inc file on the asp page. Like when you are working with ado, you need to include the vbscript file.
    Code:
    <%include file = "adovbs.inc"%>
    I hope this helps you. Hopefully, someone else in this forum has a better answer than I can give you.

    Good Luck.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

  3. #3
    Guest
    If the error occur on this line msgbox li(1) perhaps you can try this.
    Code:
    msgbox CStr(li(1))

Posting Permissions

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



Click Here to Expand Forum to Full Width