LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Open a text file in a template

Hi,
When I open a text file with Excel 2000 I have to format the whole content
and I think that this is extra work not needed.
I would like to open the text file in a template (.xlt) I have created before.
Is that possible? If so, it must be simple but I cannot figure it out
because there is no Template property in the OpenText Method.
Here is the code I use to open the text file.
' ***
ChDir strPath
Workbooks.OpenText Filename:=strTextFile, _
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, _
Tab:=True, Semicolon:=False, Comma:=True, Space:=False, _
Other:=False, FieldInfo:=Array( _
Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), _
Array(5, 2), Array(6, 2), Array(7, 2), Array(8, 2), _
Array(9, 2), Array(10, 2), Array(11, 2))
' ***
Thanks.
--
Jac Tremblay
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get a template to open as the default excel file? skillmaster Excel Discussion (Misc queries) 3 April 28th 08 08:38 PM
Workbook Open Procedure in Custom Template File Hank Excel Programming 0 March 6th 08 06:03 PM
Excel VBA - open text file, replace text, save file? Cybert Excel Programming 2 October 2nd 04 01:05 AM
Open a Template/CSV-File from the command line sidibou - ExcelForums.com Excel Programming 2 September 17th 04 05:00 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"