Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using the following code in word macro and it gives error that opentext
method failed. Set MinMax = CreateObject("Excel.Application") MinMax.workbooks.Opentext FileName:="d:\abc.txt", _ Origin:=xlMSDOS, StartRow:=17, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, _ Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), _ Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1)) Any help is appreciated. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since you appear to be using late binding,
Replace the constants with their numeric equivalents: ? xldelimited 1 ? xldoublequote 1 -- Regards, Tom Ogilvy "Kislay" wrote in message ... I am using the following code in word macro and it gives error that opentext method failed. Set MinMax = CreateObject("Excel.Application") MinMax.workbooks.Opentext FileName:="d:\abc.txt", _ Origin:=xlMSDOS, StartRow:=17, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, _ Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), _ Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1)) Any help is appreciated. Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom,
It works fine now. Kislay "Tom Ogilvy" wrote: Since you appear to be using late binding, Replace the constants with their numeric equivalents: ? xldelimited 1 ? xldoublequote 1 -- Regards, Tom Ogilvy "Kislay" wrote in message ... I am using the following code in word macro and it gives error that opentext method failed. Set MinMax = CreateObject("Excel.Application") MinMax.workbooks.Opentext FileName:="d:\abc.txt", _ Origin:=xlMSDOS, StartRow:=17, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, _ Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array(1, 1), _ Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1)) Any help is appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OpenText Method failure | Excel Programming | |||
OpenText Method of Workbook Object Question | Excel Programming | |||
How to use Opentext method with xlFixedWidth? | Excel Programming | |||
method vbproject of object workbook fail | Excel Programming | |||
Pass string as Parameter in OpenText method | Excel Programming |