+ Reply to Thread
Results 1 to 10 of 10

OpenText Method failure

  1. #1
    Bryan Dickerson
    Guest

    OpenText Method failure

    I am trying to open a text report-type document and put it into an excel
    spreadsheet. To prototype my command, I tested the following statement:

    Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))

    .... which works very well. But when I try to make it customizable, I tested
    the following statement:
    Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    fieldinfo:=sFieldInfo

    .... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1), Array(23,
    1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))",
    I get the error that I put in the Subject of this post. Anyone got any
    ideas?? Seems kinda' strange.

    TIA!!

    Bryan



  2. #2
    Tom Ogilvy
    Guest

    Re: OpenText Method failure

    so you set sFieldInfo like this

    Dim sFieldInfo as Variant

    sFieldInfo = Array(Array(0, 1), Array(13, 1), Array(23,1), _
    Array(39, 1), Array(70, 1), Array(75, 1), _
    Array(83, 1), Array(94, 1))

    If not, that is probably your problem.

    --
    Regards,
    Tom Ogilvy


    "Bryan Dickerson" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to open a text report-type document and put it into an excel
    > spreadsheet. To prototype my command, I tested the following statement:
    >
    > Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    > Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >
    > ... which works very well. But when I try to make it customizable, I

    tested
    > the following statement:
    > Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > fieldinfo:=sFieldInfo
    >
    > ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1), Array(23,
    > 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,

    1))",
    > I get the error that I put in the Subject of this post. Anyone got any
    > ideas?? Seems kinda' strange.
    >
    > TIA!!
    >
    > Bryan
    >
    >




  3. #3
    Bryan Dickerson
    Guest

    Re: OpenText Method failure

    No it's more like:

    Dim sFieldInfo as String

    sFieldInfo = "Array(Array(0, 1), Array(13, 1), Array(23,1), Array(39, 1),
    Array(70, 1), Array(75, 1), Array(83, 1), Array(94,1))"

    The string is actually created from a set of values that are read from
    somewhere else, but ultimately that's what sFieldInfo looks like right
    before it's used in the OpenText method. BTW, I wouldn't think that this
    makes a difference, but this is actually running from a VB6 program.

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > so you set sFieldInfo like this
    >
    > Dim sFieldInfo as Variant
    >
    > sFieldInfo = Array(Array(0, 1), Array(13, 1), Array(23,1), _
    > Array(39, 1), Array(70, 1), Array(75, 1), _
    > Array(83, 1), Array(94, 1))
    >
    > If not, that is probably your problem.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Bryan Dickerson" <[email protected]> wrote in message
    > news:[email protected]...
    >> I am trying to open a text report-type document and put it into an excel
    >> spreadsheet. To prototype my command, I tested the following statement:
    >>
    >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >>
    >> ... which works very well. But when I try to make it customizable, I

    > tested
    >> the following statement:
    >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> fieldinfo:=sFieldInfo
    >>
    >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    >> Array(23,
    >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,

    > 1))",
    >> I get the error that I put in the Subject of this post. Anyone got any
    >> ideas?? Seems kinda' strange.
    >>
    >> TIA!!
    >>
    >> Bryan
    >>
    >>

    >
    >




  4. #4
    Dave Peterson
    Guest

    Re: OpenText Method failure

    Just a guess by the name of sFieldInfo...

    I'm guessing you did something like:

    dim sFieldInfo as string
    sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    & "Array(75, 1), Array(83, 1), Array(94, 1))"

    ..Opentext's fieldinfo is expecting a real array--not just a string.

    Maybe something like:

    dim vFieldInfo as Variant 'name changed!
    vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    Array(23, 1), Array(39, 1), Array(70, 1), _
    Array(75, 1), Array(83, 1), Array(94, 1))

    (vFieldInfo is now a variant that contains an array of arrays--it's not a string
    value.)

    =======
    Here's a nice reference for a problem that sometimes comes up with .opentext:

    http://support.microsoft.com/default...EN-US;q134826&
    XL: "Out of Memory" Message Using the OpenText Method

    You may like it just to see another way.


    Bryan Dickerson wrote:
    >
    > I am trying to open a text report-type document and put it into an excel
    > spreadsheet. To prototype my command, I tested the following statement:
    >
    > Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    > Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >
    > ... which works very well. But when I try to make it customizable, I tested
    > the following statement:
    > Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > fieldinfo:=sFieldInfo
    >
    > ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1), Array(23,
    > 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))",
    > I get the error that I put in the Subject of this post. Anyone got any
    > ideas?? Seems kinda' strange.
    >
    > TIA!!
    >
    > Bryan


    --

    Dave Peterson

  5. #5
    Tom Ogilvy
    Guest

    Re: OpenText Method failure

    The argument isn't looking for a string, it is looking for an array of
    arrays - so, as I said, if it doesn't look like what i showed you, that is
    your problem.

    --
    Regards,
    Tom Ogilvy

    "Bryan Dickerson" <[email protected]> wrote in message
    news:[email protected]...
    > No it's more like:
    >
    > Dim sFieldInfo as String
    >
    > sFieldInfo = "Array(Array(0, 1), Array(13, 1), Array(23,1), Array(39, 1),
    > Array(70, 1), Array(75, 1), Array(83, 1), Array(94,1))"
    >
    > The string is actually created from a set of values that are read from
    > somewhere else, but ultimately that's what sFieldInfo looks like right
    > before it's used in the OpenText method. BTW, I wouldn't think that this
    > makes a difference, but this is actually running from a VB6 program.
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    > > so you set sFieldInfo like this
    > >
    > > Dim sFieldInfo as Variant
    > >
    > > sFieldInfo = Array(Array(0, 1), Array(13, 1), Array(23,1), _
    > > Array(39, 1), Array(70, 1), Array(75, 1), _
    > > Array(83, 1), Array(94, 1))
    > >
    > > If not, that is probably your problem.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Bryan Dickerson" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> I am trying to open a text report-type document and put it into an

    excel
    > >> spreadsheet. To prototype my command, I tested the following

    statement:
    > >>
    > >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    > >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    > >>
    > >> ... which works very well. But when I try to make it customizable, I

    > > tested
    > >> the following statement:
    > >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >> fieldinfo:=sFieldInfo
    > >>
    > >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    > >> Array(23,
    > >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,

    > > 1))",
    > >> I get the error that I put in the Subject of this post. Anyone got any
    > >> ideas?? Seems kinda' strange.
    > >>
    > >> TIA!!
    > >>
    > >> Bryan
    > >>
    > >>

    > >
    > >

    >
    >




  6. #6
    Bryan Dickerson
    Guest

    Re: OpenText Method failure

    Ok, so am I screwed if I'm reading the numbers from somewhere else? 'Cause
    the way I figure it, I'm reading the values in thru db record value that
    has, e.g., "1;14;24;..." in it. In my code, I'm taking those values,
    separating them and then trying to create the string that duplicates that
    parm "FieldInfo:=Array(Array(0, 1), Array(13, 1), ..." So I've got to find
    some way (and I don't think there is one, but please correct me if I'm
    wrong), to create code on the fly and get it to be interpreted.

    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > Just a guess by the name of sFieldInfo...
    >
    > I'm guessing you did something like:
    >
    > dim sFieldInfo as string
    > sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    > & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    > & "Array(75, 1), Array(83, 1), Array(94, 1))"
    >
    > .Opentext's fieldinfo is expecting a real array--not just a string.
    >
    > Maybe something like:
    >
    > dim vFieldInfo as Variant 'name changed!
    > vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    > Array(23, 1), Array(39, 1), Array(70, 1), _
    > Array(75, 1), Array(83, 1), Array(94, 1))
    >
    > (vFieldInfo is now a variant that contains an array of arrays--it's not a
    > string
    > value.)
    >
    > =======
    > Here's a nice reference for a problem that sometimes comes up with
    > .opentext:
    >
    > http://support.microsoft.com/default...EN-US;q134826&
    > XL: "Out of Memory" Message Using the OpenText Method
    >
    > You may like it just to see another way.
    >
    >
    > Bryan Dickerson wrote:
    >>
    >> I am trying to open a text report-type document and put it into an excel
    >> spreadsheet. To prototype my command, I tested the following statement:
    >>
    >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >>
    >> ... which works very well. But when I try to make it customizable, I
    >> tested
    >> the following statement:
    >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> fieldinfo:=sFieldInfo
    >>
    >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    >> Array(23,
    >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,
    >> 1))",
    >> I get the error that I put in the Subject of this post. Anyone got any
    >> ideas?? Seems kinda' strange.
    >>
    >> TIA!!
    >>
    >> Bryan

    >
    > --
    >
    > Dave Peterson




  7. #7
    Tom Ogilvy
    Guest

    Re: OpenText Method failure

    Read the "nice" article Dave posted. In that article, they create it on
    the fly. If you have the information to build the string, you have the
    information to build the array.

    --
    Regards,
    Tom Ogilvy


    "Bryan Dickerson" <[email protected]> wrote in message
    news:[email protected]...
    > Ok, so am I screwed if I'm reading the numbers from somewhere else?

    'Cause
    > the way I figure it, I'm reading the values in thru db record value that
    > has, e.g., "1;14;24;..." in it. In my code, I'm taking those values,
    > separating them and then trying to create the string that duplicates that
    > parm "FieldInfo:=Array(Array(0, 1), Array(13, 1), ..." So I've got to

    find
    > some way (and I don't think there is one, but please correct me if I'm
    > wrong), to create code on the fly and get it to be interpreted.
    >
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > Just a guess by the name of sFieldInfo...
    > >
    > > I'm guessing you did something like:
    > >
    > > dim sFieldInfo as string
    > > sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    > > & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    > > & "Array(75, 1), Array(83, 1), Array(94, 1))"
    > >
    > > .Opentext's fieldinfo is expecting a real array--not just a string.
    > >
    > > Maybe something like:
    > >
    > > dim vFieldInfo as Variant 'name changed!
    > > vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    > > Array(23, 1), Array(39, 1), Array(70, 1), _
    > > Array(75, 1), Array(83, 1), Array(94, 1))
    > >
    > > (vFieldInfo is now a variant that contains an array of arrays--it's not

    a
    > > string
    > > value.)
    > >
    > > =======
    > > Here's a nice reference for a problem that sometimes comes up with
    > > .opentext:
    > >
    > > http://support.microsoft.com/default...EN-US;q134826&
    > > XL: "Out of Memory" Message Using the OpenText Method
    > >
    > > You may like it just to see another way.
    > >
    > >
    > > Bryan Dickerson wrote:
    > >>
    > >> I am trying to open a text report-type document and put it into an

    excel
    > >> spreadsheet. To prototype my command, I tested the following

    statement:
    > >>
    > >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39, 1),
    > >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    > >>
    > >> ... which works very well. But when I try to make it customizable, I
    > >> tested
    > >> the following statement:
    > >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >> fieldinfo:=sFieldInfo
    > >>
    > >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    > >> Array(23,
    > >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,
    > >> 1))",
    > >> I get the error that I put in the Subject of this post. Anyone got any
    > >> ideas?? Seems kinda' strange.
    > >>
    > >> TIA!!
    > >>
    > >> Bryan

    > >
    > > --
    > >
    > > Dave Peterson

    >
    >




  8. #8
    Bryan Dickerson
    Guest

    Re: OpenText Method failure

    Very interesting. Thanx! Oh, and thanx to you, too, Dave. Next time I'll
    read the WHOLE article!

    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > Read the "nice" article Dave posted. In that article, they create it on
    > the fly. If you have the information to build the string, you have the
    > information to build the array.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Bryan Dickerson" <[email protected]> wrote in message
    > news:[email protected]...
    >> Ok, so am I screwed if I'm reading the numbers from somewhere else?

    > 'Cause
    >> the way I figure it, I'm reading the values in thru db record value that
    >> has, e.g., "1;14;24;..." in it. In my code, I'm taking those values,
    >> separating them and then trying to create the string that duplicates that
    >> parm "FieldInfo:=Array(Array(0, 1), Array(13, 1), ..." So I've got to

    > find
    >> some way (and I don't think there is one, but please correct me if I'm
    >> wrong), to create code on the fly and get it to be interpreted.
    >>
    >> "Dave Peterson" <[email protected]> wrote in message
    >> news:[email protected]...
    >> > Just a guess by the name of sFieldInfo...
    >> >
    >> > I'm guessing you did something like:
    >> >
    >> > dim sFieldInfo as string
    >> > sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    >> > & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    >> > & "Array(75, 1), Array(83, 1), Array(94, 1))"
    >> >
    >> > .Opentext's fieldinfo is expecting a real array--not just a string.
    >> >
    >> > Maybe something like:
    >> >
    >> > dim vFieldInfo as Variant 'name changed!
    >> > vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    >> > Array(23, 1), Array(39, 1), Array(70, 1), _
    >> > Array(75, 1), Array(83, 1), Array(94, 1))
    >> >
    >> > (vFieldInfo is now a variant that contains an array of arrays--it's not

    > a
    >> > string
    >> > value.)
    >> >
    >> > =======
    >> > Here's a nice reference for a problem that sometimes comes up with
    >> > .opentext:
    >> >
    >> > http://support.microsoft.com/default...EN-US;q134826&
    >> > XL: "Out of Memory" Message Using the OpenText Method
    >> >
    >> > You may like it just to see another way.
    >> >
    >> >
    >> > Bryan Dickerson wrote:
    >> >>
    >> >> I am trying to open a text report-type document and put it into an

    > excel
    >> >> spreadsheet. To prototype my command, I tested the following

    > statement:
    >> >>
    >> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39,
    >> >> 1),
    >> >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >> >>
    >> >> ... which works very well. But when I try to make it customizable, I
    >> >> tested
    >> >> the following statement:
    >> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >> >> fieldinfo:=sFieldInfo
    >> >>
    >> >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    >> >> Array(23,
    >> >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,
    >> >> 1))",
    >> >> I get the error that I put in the Subject of this post. Anyone got
    >> >> any
    >> >> ideas?? Seems kinda' strange.
    >> >>
    >> >> TIA!!
    >> >>
    >> >> Bryan
    >> >
    >> > --
    >> >
    >> > Dave Peterson

    >>
    >>

    >
    >




  9. #9
    Bryan Dickerson
    Guest

    Re: OpenText Method failure

    Good news: It works! Amazing what happens when you just read the
    instructions, huh??

    "Bryan Dickerson" <[email protected]> wrote in message
    news:[email protected]...
    > Very interesting. Thanx! Oh, and thanx to you, too, Dave. Next time
    > I'll read the WHOLE article!
    >
    > "Tom Ogilvy" <[email protected]> wrote in message
    > news:[email protected]...
    >> Read the "nice" article Dave posted. In that article, they create it on
    >> the fly. If you have the information to build the string, you have the
    >> information to build the array.
    >>
    >> --
    >> Regards,
    >> Tom Ogilvy
    >>
    >>
    >> "Bryan Dickerson" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Ok, so am I screwed if I'm reading the numbers from somewhere else?

    >> 'Cause
    >>> the way I figure it, I'm reading the values in thru db record value that
    >>> has, e.g., "1;14;24;..." in it. In my code, I'm taking those values,
    >>> separating them and then trying to create the string that duplicates
    >>> that
    >>> parm "FieldInfo:=Array(Array(0, 1), Array(13, 1), ..." So I've got to

    >> find
    >>> some way (and I don't think there is one, but please correct me if I'm
    >>> wrong), to create code on the fly and get it to be interpreted.
    >>>
    >>> "Dave Peterson" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>> > Just a guess by the name of sFieldInfo...
    >>> >
    >>> > I'm guessing you did something like:
    >>> >
    >>> > dim sFieldInfo as string
    >>> > sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    >>> > & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    >>> > & "Array(75, 1), Array(83, 1), Array(94, 1))"
    >>> >
    >>> > .Opentext's fieldinfo is expecting a real array--not just a string.
    >>> >
    >>> > Maybe something like:
    >>> >
    >>> > dim vFieldInfo as Variant 'name changed!
    >>> > vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    >>> > Array(23, 1), Array(39, 1), Array(70, 1), _
    >>> > Array(75, 1), Array(83, 1), Array(94, 1))
    >>> >
    >>> > (vFieldInfo is now a variant that contains an array of arrays--it's
    >>> > not

    >> a
    >>> > string
    >>> > value.)
    >>> >
    >>> > =======
    >>> > Here's a nice reference for a problem that sometimes comes up with
    >>> > .opentext:
    >>> >
    >>> > http://support.microsoft.com/default...EN-US;q134826&
    >>> > XL: "Out of Memory" Message Using the OpenText Method
    >>> >
    >>> > You may like it just to see another way.
    >>> >
    >>> >
    >>> > Bryan Dickerson wrote:
    >>> >>
    >>> >> I am trying to open a text report-type document and put it into an

    >> excel
    >>> >> spreadsheet. To prototype my command, I tested the following

    >> statement:
    >>> >>
    >>> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >>> >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39,
    >>> >> 1),
    >>> >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    >>> >>
    >>> >> ... which works very well. But when I try to make it customizable, I
    >>> >> tested
    >>> >> the following statement:
    >>> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    >>> >> fieldinfo:=sFieldInfo
    >>> >>
    >>> >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    >>> >> Array(23,
    >>> >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,
    >>> >> 1))",
    >>> >> I get the error that I put in the Subject of this post. Anyone got
    >>> >> any
    >>> >> ideas?? Seems kinda' strange.
    >>> >>
    >>> >> TIA!!
    >>> >>
    >>> >> Bryan
    >>> >
    >>> > --
    >>> >
    >>> > Dave Peterson
    >>>
    >>>

    >>
    >>

    >
    >




  10. #10
    Dave Peterson
    Guest

    Re: OpenText Method failure

    Woohoo!!!



    Bryan Dickerson wrote:
    >
    > Good news: It works! Amazing what happens when you just read the
    > instructions, huh??
    >
    > "Bryan Dickerson" <[email protected]> wrote in message
    > news:[email protected]...
    > > Very interesting. Thanx! Oh, and thanx to you, too, Dave. Next time
    > > I'll read the WHOLE article!
    > >
    > > "Tom Ogilvy" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Read the "nice" article Dave posted. In that article, they create it on
    > >> the fly. If you have the information to build the string, you have the
    > >> information to build the array.
    > >>
    > >> --
    > >> Regards,
    > >> Tom Ogilvy
    > >>
    > >>
    > >> "Bryan Dickerson" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >>> Ok, so am I screwed if I'm reading the numbers from somewhere else?
    > >> 'Cause
    > >>> the way I figure it, I'm reading the values in thru db record value that
    > >>> has, e.g., "1;14;24;..." in it. In my code, I'm taking those values,
    > >>> separating them and then trying to create the string that duplicates
    > >>> that
    > >>> parm "FieldInfo:=Array(Array(0, 1), Array(13, 1), ..." So I've got to
    > >> find
    > >>> some way (and I don't think there is one, but please correct me if I'm
    > >>> wrong), to create code on the fly and get it to be interpreted.
    > >>>
    > >>> "Dave Peterson" <[email protected]> wrote in message
    > >>> news:[email protected]...
    > >>> > Just a guess by the name of sFieldInfo...
    > >>> >
    > >>> > I'm guessing you did something like:
    > >>> >
    > >>> > dim sFieldInfo as string
    > >>> > sFieldInfo = "Array(Array(0, 1), Array(13, 1)," _
    > >>> > & "Array(23, 1), Array(39, 1), Array(70, 1)," _
    > >>> > & "Array(75, 1), Array(83, 1), Array(94, 1))"
    > >>> >
    > >>> > .Opentext's fieldinfo is expecting a real array--not just a string.
    > >>> >
    > >>> > Maybe something like:
    > >>> >
    > >>> > dim vFieldInfo as Variant 'name changed!
    > >>> > vFieldInfo = Array(Array(0, 1), Array(13, 1), _
    > >>> > Array(23, 1), Array(39, 1), Array(70, 1), _
    > >>> > Array(75, 1), Array(83, 1), Array(94, 1))
    > >>> >
    > >>> > (vFieldInfo is now a variant that contains an array of arrays--it's
    > >>> > not
    > >> a
    > >>> > string
    > >>> > value.)
    > >>> >
    > >>> > =======
    > >>> > Here's a nice reference for a problem that sometimes comes up with
    > >>> > .opentext:
    > >>> >
    > >>> > http://support.microsoft.com/default...EN-US;q134826&
    > >>> > XL: "Out of Memory" Message Using the OpenText Method
    > >>> >
    > >>> > You may like it just to see another way.
    > >>> >
    > >>> >
    > >>> > Bryan Dickerson wrote:
    > >>> >>
    > >>> >> I am trying to open a text report-type document and put it into an
    > >> excel
    > >>> >> spreadsheet. To prototype my command, I tested the following
    > >> statement:
    > >>> >>
    > >>> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >>> >> fieldinfo:=Array(Array(0, 1), Array(13, 1), Array(23, 1), Array(39,
    > >>> >> 1),
    > >>> >> Array(70, 1), Array(75, 1), Array(83, 1), Array(94, 1))
    > >>> >>
    > >>> >> ... which works very well. But when I try to make it customizable, I
    > >>> >> tested
    > >>> >> the following statement:
    > >>> >> Excel.Workbooks.OpenText FileName:=sAttachPath & "\" & EMAttachment,
    > >>> >> fieldinfo:=sFieldInfo
    > >>> >>
    > >>> >> ... where sFieldInfo is set to "Array(Array(0, 1), Array(13, 1),
    > >>> >> Array(23,
    > >>> >> 1), Array(39, 1), Array(70, 1), Array(75, 1), Array(83, 1), Array(94,
    > >>> >> 1))",
    > >>> >> I get the error that I put in the Subject of this post. Anyone got
    > >>> >> any
    > >>> >> ideas?? Seems kinda' strange.
    > >>> >>
    > >>> >> TIA!!
    > >>> >>
    > >>> >> Bryan
    > >>> >
    > >>> > --
    > >>> >
    > >>> > Dave Peterson
    > >>>
    > >>>
    > >>
    > >>

    > >
    > >


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1