Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dorothy Dorothy is offline
external usenet poster
 
Posts: 17
Default Rename Header for tables generated using Database field

I am using Database field to generate a table from a delimited file.
However, I want to table headers to be renamed dynamically. I was expecting
this can be done by renaming column names in SQL statement, e.g.

SELECT COL1 [NEW_COL1] FROM C:\\Test.txt

However, it gave me an err message of "Word was unable to open the data
source".


I am using Word 2003 and using the default connect info.
Can anyone help?
Thanks,
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Rename Header for tables generated using Database field

1. For this to work, you have to be using a dialect of SQL that lets you
"alias" the field names. However, in this case I think the DATABASE
field will use Word's internal text converter, which uses a very simple
dialect of SQL that does not support that.

2. However, even changing your DATABASE field so that it will get the
data via OLE DB (and therefore use the Jet/ACE SQL dialect) does not
seem to let you use alias names for the fields - at least, not n Word
2007. It could be that I have not used the correct syntax but I am using
exactly the same statement as I can successfully use in Access.


Peter Jamieson

http://tips.pjmsn.me.uk

dorothy wrote:
I am using Database field to generate a table from a delimited file.
However, I want to table headers to be renamed dynamically. I was expecting
this can be done by renaming column names in SQL statement, e.g.

SELECT COL1 [NEW_COL1] FROM C:\\Test.txt

However, it gave me an err message of "Word was unable to open the data
source".


I am using Word 2003 and using the default connect info.
Can anyone help?
Thanks,

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting a Table generated thru a DATABASE Switch cleech Mailmerge 0 May 22nd 08 09:56 PM
Auto-generated Paragraphs in Header / Footnote spacer BradleyT79 Page Layout 7 May 15th 07 12:46 PM
how do I rename a merge field soshapely Mailmerge 1 April 2nd 07 03:15 PM
dynamically add header / footer to a word doc generated by asp Jay Page Layout 3 March 31st 05 05:29 PM
Styles need to support building generated tables of Figures, Tabl. c1mmathe Tables 1 November 18th 04 11:32 PM


All times are GMT +1. The time now is 02:11 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"