View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bryan Dickerson Bryan Dickerson is offline
external usenet poster
 
Posts: 42
Default 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