Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2007

Tip: Looking for answers? Try searching our database.

open CSV file in table format in Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
muyBN - 06 Jun 2007 11:44 GMT
Is there a way of programatically opening a CSV file in Word so that it's in
table format, like it does in Excel? It's easy enough to write code to
convert it to a table after opeining it, but it's kind of a pain to have to
do it that way since some fields are separated simply with commas and others
with commas and double quote marks.

Signature

Bryan

Graham Mayor - 06 Jun 2007 13:42 GMT
Of course not. CSV is a plain text file. Plain text does not support tables.
You don't even need code to convert it to a table - select the text then
table > convert text to table. See
http://www.gmayor.com/convert_labels_into_mail_merge.htm  and save as a Word
document.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Is there a way of programatically opening a CSV file in Word so that
> it's in table format, like it does in Excel? It's easy enough to
> write code to convert it to a table after opeining it, but it's kind
> of a pain to have to do it that way since some fields are separated
> simply with commas and others with commas and double quote marks.
Peter Jamieson - 07 Jun 2007 17:28 GMT
Use Word's database toolbar, or try the InsertDatabase method in VBA.

It doesn't always work with CSV files because of errors in WOrd, but worth a
try.

Peter Jamieson

> Is there a way of programatically opening a CSV file in Word so that it's
> in
[quoted text clipped - 4 lines]
> others
> with commas and double quote marks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.