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" wrote in message
...
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
|