Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic index, TOC

Status
Not open for further replies.

reavenm

IS-IT--Management
Nov 12, 2007
10
PR
Ok i have a word report of like 300 pages inside are accounts information each account have a unique Acc. number, this report change each month at least the info does not the account number.

it is possible to make a dynamic index so each time the report change you dont have to index all the account numbers so the index stays the same because the report format never change, only the info in the report for each account does.

so i want the index or TOC to search for Ex. "1234" on the report no matter if the info on the report change .

this is a report example
__________________________________________________

Store whatever 1
address v fvfrvfvfrvbfrv account# 1234
----------------------------------------------------------------------------------------
sys..........................................................................10/11/07
sys...........................................................................11/11/07

______________________________________________________

Store whatever 2
address dlcedvjfevjf account# 4567
----------------------------------------------------------------------------------------
sys..........................................................................10/11/07
sys...........................................................................11/11/07

_______________________________________________________

ok i receive this file every month the same file the only thing change is the info in where said "sys.........date "
i would like to make an somekind of index or TOC for example

account 1234.....................................Store 1
account 4567.....................................Store 2

so when i click any of those get me there no matter if i change the info. so then i cant mark for index individual acc. #'s because when the info change and i pasted the new one over the index or TOC info will dissapear.

there's a way to do this in VBA
Thanks

 
reavenm,

Why not use a combo box? You could input the Account # you want and then pass that to a Search routine.

[glasses]

----------------------------------------------------------------------------------
[small]How did the newspaper describe the swindler who fell off the prison roof during an escape attempt?[/small]
[spineyes]They used a condescending remark.[bugeyed]
 
that would be perfect, how i do that ?
 
Are you talking about a real ToC? A Table of Contents can be hyperlink to the entry.

If this is not a real ToC, but some listing of some kind, then you could still use hyperlinks. Are there multiple account per store?

Bookmarks.


Store whatever 1
address v fvfrvfvfrvbfrv account# 1234
------------------------------------------------------------
sys..............................................10/11/07
sys..............................................11/11/07

______________________________________________________

Store whatever 2
address dlcedvjfevjf account# 4567
------------------------------------------------------------
sys..............................................10/11/07
sys..............................................11/11/07

The text in bold are bookmarks.

account 1234..................................Store 1
account 4567..................................Store 2

The text in bold are hyperlinks pointing to the bookmarks.

Click on them, and they go to the bookmark.

faq219-2884

Gerry
My paintings and sculpture
 
fumei,

My first thought was hyperlinks, but with 300 pages (and no info on how many accounts might be on a page) it seemed that a single search on user-entered box data might be more efficient than building what could be a huge ToC/Index.

It would be helpful at this point to know how many accounts reavenm really has in this document.

[glasses]

----------------------------------------------------------------------------------
[small]How did the newspaper describe the swindler who fell off the prison roof during an escape attempt?[/small]
[spineyes]They used a condescending remark.[bugeyed]
 





This is really a job for a Comcordance. You can use a concordance to hold a list of items to index, and then generate an index in the target document.

I've used this approch, by
[tt]
copying ALL the text in a document,
pasting into the concordance doc,
replacing spaces with paragraph marks (one column of words),
sort
reduce to unique values
remove unwanted words
[/tt]
then generate the index using the concordance.

...and VOLA!


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
well there are like exactly 57 accounts and to be exact isnt like an account per page because the data is continuously so maybe one account take 1 1/5 page and then after that theres the other account.

but the concordance thing sounds good ..

"Skip" -theres something else i need to know to make that ?

all i need is click in an account link and that take me there and when the report change i cant paste the new one over the old and can still work .
 



No, all the info is in the help.

When the report changes, you will have to generate a new INDEX.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
by generate a new index you mean auto update the index or i have to mark all the account #'s again in the document
 




"... auto update the index ..."

How does the report change?

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
well the information that are where it says

------------------------------------------------------------
sys..............................................10/11/07
sys..............................................11/11/07


.that info change but the info about the store name, # and account # is the same.

thats why at first i thought the index was not going to work because you have to mark the exact words you want to index so when the info on the report change the index will gone, am right ?
 

If you use the account numbers for your index it won't matter how many changes you make to the data within each account, the index won't change. However, if you overwrite the entire document each time a new report is received, you would need to generate a new index each time.

It seems as if an easy way around this would be to place the completed index on Page 1 of the document, and all the other data on the following pages. That way each time a new report is received you would only need to overwrite beginning on Page 2; your index would not be impacted at all. This way you would only have to re-index when you gained or lost an account.

[glasses]

----------------------------------------------------------------------------------
[small]How did the newspaper describe the swindler who fell off the prison roof during an escape attempt?[/small]
[spineyes]They used a condescending remark.[bugeyed]
 




When any reference is created, the string is bracketed by control strings.

If you never destroy (overwrite) these or add new strings to be included in the index, or delete an indexed string, your index will remain in tact.

Any time your data fundamentally changes, you need to create a new index. But what's the big deal about that? You record a macro for creating the index, and after that, it a button-push!

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
My first thought was hyperlinks, but with 300 pages (and no info on how many accounts might be on a page) it seemed that a single search on user-entered box data might be more efficient than building what could be a huge ToC/Index.
Using hyperlinks is neither a ToC, nor an Index. The listing would be manually created, especially as the format stated by the OP:

account 1234.....................................Store 1
account 4567.....................................Store 2

is not a Word generated format.

However, all that aside, Skip's suggestion of a concordance would probably be better.

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top