Reply
 
Thread Tools Display Modes
  #1   Report Post  
zalek
 
Posts: n/a
Default internal code for index or table of contents

Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek

  #2   Report Post  
Jonathan West
 
Posts: n/a
Default

First question. Do you want a Table of Contents (i.e. with the entries in
the table in the order in thich they appear in the document) or an Index
(i.e. with the entries sorted alphabetically?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"zalek" wrote in message
oups.com...
Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek


  #3   Report Post  
zalek
 
Posts: n/a
Default


Jonathan West wrote:
First question. Do you want a Table of Contents (i.e. with the entries in
the table in the order in thich they appear in the document) or an Index
(i.e. with the entries sorted alphabetically?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



I prefare the Index, but I would like to know codes for the Table of
Contents too.

Thanks,

Zalek


Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"zalek" wrote in message
oups.com...
Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek


  #4   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

XE fields are used to create an index, TC fields a TOC. You can create a TOC
without using TC fields (using headings or outline levels), but you cannot
create an index except with XE fields. See the Help topic "Field codes: XE
(Index Entry) field" for more.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"zalek" wrote in message
oups.com...

Jonathan West wrote:
First question. Do you want a Table of Contents (i.e. with the entries

in
the table in the order in thich they appear in the document) or an Index
(i.e. with the entries sorted alphabetically?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



I prefare the Index, but I would like to know codes for the Table of
Contents too.

Thanks,

Zalek


Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"zalek" wrote in message
oups.com...
Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of

containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek



  #5   Report Post  
Jonathan West
 
Posts: n/a
Default

If you want to add the field by means of a VBA macro, then you use the Add
method of the Fields collection. The Range property of the method defines
where the field is inserted. You can insert XE and TC fields this way.

The VBA help file entry for the Fields collection includes code examples for
how to do this.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"Suzanne S. Barnhill" wrote in message
...
XE fields are used to create an index, TC fields a TOC. You can create a
TOC
without using TC fields (using headings or outline levels), but you cannot
create an index except with XE fields. See the Help topic "Field codes: XE
(Index Entry) field" for more.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"zalek" wrote in message
oups.com...

Jonathan West wrote:
First question. Do you want a Table of Contents (i.e. with the entries

in
the table in the order in thich they appear in the document) or an
Index
(i.e. with the entries sorted alphabetically?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup



I prefare the Index, but I would like to know codes for the Table of
Contents too.

Thanks,

Zalek


Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"zalek" wrote in message
oups.com...
Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this
is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of

containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek






  #6   Report Post  
zalek
 
Posts: n/a
Default

Well, I tried to do it, but it didn't work.

Here is what I did:

I wrote the Access table to a .TXT file.
For each string I wanted to be in the Index I created a additional
string '{XE "field name" }', for example if I wanted the string Zalek
to be in the Index - I wroted:
Zalek {XE "Zalek"}
Next opened the created .txt file in the Word. but when I tried: Insert
- Indexes and tables it said:
Error! No index entries found.

I also looked on values of inserted string when I created the Index
from the Word. It showed that the Word insted of character { is using a
character of ACII value 19 and insted of charater } is using a charater
of ascii value 21.

Any ideas what to do next?

Thanks,

Zalek

Jonathan West wrote:
If you want to add the field by means of a VBA macro, then you use the Add
method of the Fields collection. The Range property of the method defines
where the field is inserted. You can insert XE and TC fields this way.

The VBA help file entry for the Fields collection includes code examples for
how to do this.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"Suzanne S. Barnhill" wrote in message
...
XE fields are used to create an index, TC fields a TOC. You can create a
TOC
without using TC fields (using headings or outline levels), but you cannot
create an index except with XE fields. See the Help topic "Field codes: XE
(Index Entry) field" for more.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"zalek" wrote in message
oups.com...

Jonathan West wrote:
First question. Do you want a Table of Contents (i.e. with the entries

in
the table in the order in thich they appear in the document) or an
Index
(i.e. with the entries sorted alphabetically?

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup


I prefare the Index, but I would like to know codes for the Table of
Contents too.

Thanks,

Zalek


Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

"zalek" wrote in message
oups.com...
Hello,

Here is my problem: I have an Access table with 2 columns: a keyword
and a memo. From this table I want to create a Word document - this
is
no brainer, I know how to do it. Now the difficult part - I want to
create an index table from the keyword columns (or table of

containts).
My question: what are the internal values of code that mark a word an
the index?
I know how to do it manualy, but because the table have over thousand
entries, I want to do it automaticly.

Thanks,

Zalek




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
Updating a table of contents Frank Drost Microsoft Word Help 1 July 8th 05 05:54 AM
Updating a table of contents Frank Drost Microsoft Word Help 9 June 29th 05 05:41 AM
developing multiple table of contents Chad Microsoft Word Help 1 June 22nd 05 04:40 AM
Table AutoFormats vs. Table Styles confusion Tony Jollans Tables 5 March 6th 05 07:18 PM
Item in Table of Contents throw off numbering Robert McN Page Layout 4 January 27th 05 12:50 AM


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

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"