The Invoice will not change, its only ever going to be on line 26 or line 27 I tried your code but all i get is an error messag saying:
You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. When i copy the invoice in here it goes all over the place > As I said, relying on line numbers doesn't seem like a robust method - > what happens if the top of the invoice is changed, and it suddenly > becomes line 15/16 or 32/33 or something else? > > Ideally you refer specifically to the location of the invoice number, > hence asking for a sample of the invoice to see what structure it uses. > > > > If you r*eally* want to deal with line numbers, then you can split the > content into an array and do something like this: > > <cfif Len(line[26]) > > <cfset InvoiceNo = line[26] /> > <cfelseif Len(line[27]) > > <cfset InvoiceNo = line[27] /> > <cfelse> > <cfthrow message="Can't locate invoice number." /> > </cfif> > > (Or, if this is the only time you're looking at lines, use ListGetAt > with newlines as delimiters) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327368 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4