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 / January 2005

Tip: Looking for answers? Try searching our database.

OT: putting list into table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
?rjan Skogl?sa - 25 Jan 2005 08:20 GMT
I guess this is off topic and I would appreciate if you could point
out the correct forum for this question.

I have a (very) long glossary that I need to transform into a table
form. (See structure below.)

I guess I have to process every record between ** one at a time,
putting the content into an array with the <>-tags as index name and
the text after the tag as the respectively value and then insert the
values  into a table with coulumn names corresponding to the the index
names.

Could/should this be done with VBA?

TIA
Örjan

======== glossary structure ===========

**
<TAG>MC
<TAG>CTV
<Deutsch>Abwinkelung
<GEN>f
<English>angled part
<SRC>METAL
<English>angle
<SRC>METAL
**
<TAG>MC
<Deutsch>i.O.-Gerät/Teil
<GEN>n
<English>TNF unit
<USE>official
<REM>TNF = Trouble Not Found!
<SRC>TFÜ
**
<TAG>MC
<Deutsch>Anschlußkontakt
<GEN>m
<English>contact
<SRC>METAL
**
<TAG>MC
<Deutsch>Reverseschalten
<GEN>n
<English>reversing
<SRC>METAL
**
<TAG>MC
<Deutsch>Zündschloß
<GEN>n
<English>ignition lock
<SRC>METAL
<Español>cerradura de encendido
<GEN>f
<SRC>TEXTRA
**
etc, etc
Helmut Weber - 25 Jan 2005 16:50 GMT
Hi Örjan,

not a beginners's task, I'd say, and less a problem of
Word as a problem of logic. The best forum maybe
microsoft.public.word.vba.general, not because of
Word programming, but because of the linguistic expertise there.

First you would need an exhaustive list of all tags.
Which reveals a first problem, as unfortunately e.g. gender "<GEN>"
has different meanings, depending on the preceding language.
From that follows, that the data do not really fit into
a table, as they are not 2-dimensional.
Let's say the expression1 is equal "Abwinkelung".
Then there is English(expression1) and
possibly Spanish(expression1), but there is, too,
Gender(Spanish(expression1)), which makes it 3-dimensional.
For a 2-dimensional represention you would need a list of
all possible genders in all possible languages.
And "<USE>" maybe dependant of the gender of the language
of the expression...

Then there is the complication, that the records may contain
different numbers of fields. Pretty bad. Must be possible
to overcome, but would be very complicated, see below "recursion".

As a start, if you really want to go through that,
I'd fill up all records with all possible fields,
which would determine the number columns.
Difficult enough.

Very off topic, but a hobby of mine:

Otherwise, you'll run into problems with recursion
similar to the "travelling salesman" problem.
Theoretically solvable, but only if there is no time limit.
In that context, I've learned a new expression:
computation time in CPU-years.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/


?rjan Skogl?sa - 26 Jan 2005 08:18 GMT
Hi Helmut,

thanks for your input.  I see it was more difficult than I thought.

As for now, I "solved" it by discarding every information but the
direct term pair. (I deleted everything but the first german and the
first english pair and used that as a simple term listing.)

Next time, according to your advice I first decide whether I have the
time or not.
If yes, I´d go for that exhaustive 2-dimensional list of tags (perhaps
manually collected) and then compare every tag to that list until I
get a match, insert the tag's value in the corresponding table column
and then match the next tag to the _next_ item in the list. That
should work, shouldn´t it? (At least if the the tags always come in
the same order.) But probably it would be better to do this in Excel?

Well, I´ll leave this for now.

Schöne Grüße aus Schonen.

Örjan

>Hi Örjan,
>
[quoted text clipped - 40 lines]
>Word XP, Win 98
>http://word.mvps.org/

Rate this thread:






 
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.