Macro to transfer info from Word to Access

P

Patricia Lajoie

Hi guys

I have a list of words with definitions and references on a Word document. The words are in bold, the definition are normal and the references are in italic (you can see an example at the bottom). I wonder if there is a way that a macro can, automatically, copy individually each bold, normal and italics words/sentences, and put them in their columns respectivelly. (please see bottom for an illustration of my problem)

Exemple
--------- WORD DOCUMENT ----------------------
[bold world (1) to be define]: [(aaa)definition in normal
[references in italics

[bold world (2) to be define]: [(bbb)definition in normal
[references in italics

[bold world (3) to be define]: [(ccc)definition in normal
[references in italics

[bold world (4) to be define]: [(ddd)definition in normal
[references in italics

...

VVVVVVVVVVVVVVVVVVVVVVVVVVVVV
MACR
VVVVVVVVVVVVVVVVVVVVVVVVVVVV

----------------- ACCESS TABLE ----------------

WORDS DEFINITIONS REFERENCE
1 aaa ..
2 bbb .......
3 ccc ..........
4 ddd ..............
...

Please, if anybody can help me with this macro, I would greatly appreciate it

Poor me
Pat. :
 
J

Jezebel

Easy enough to write a macro to do this, but not trivial. Rather more
complex than you expect from a forum posting. Are you able to make a start
and post questions for the bits of the task you're having trouble with?

Alternatively, convert your document so that each entry is on one line with
the three types of information delimited by a standard character (tab, |, or
some such). If your document is as well-structured as your sample suggests,
you should be able to do it easily using Find and Replace. Your structure
appears to be

[Word]:[Definition]^p[References]^p^p

Then save the document as a text file and you should be able to read that
directly into Access. Or copy it, paste it into Excel and check that your
columns have ended up in the right places. Correct as necessary, save, and
use Access's Get External Data function to read it.




Patricia Lajoie said:
Hi guys,

I have a list of words with definitions and references on a Word
document. The words are in bold, the definition are normal and the
references are in italic (you can see an example at the bottom). I wonder if
there is a way that a macro can, automatically, copy individually each bold,
normal and italics words/sentences, and put them in their columns
respectivelly. (please see bottom for an illustration of my problem).
Exemple:
--------- WORD DOCUMENT -----------------------
[bold world (1) to be define]: [(aaa)definition in normal]
[references in italics]

[bold world (2) to be define]: [(bbb)definition in normal]
[references in italics]

[bold world (3) to be define]: [(ccc)definition in normal]
[references in italics]

[bold world (4) to be define]: [(ddd)definition in normal]
[references in italics]

...

VVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
MACRO
VVVVVVVVVVVVVVVVVVVVVVVVVVVVV

----------------- ACCESS TABLE -----------------

WORDS DEFINITIONS REFERENCES
1 aaa ....
2 bbb .........
3 ccc ............
4 ddd ................
...

Please, if anybody can help me with this macro, I would greatly appreciate it!

Poor me,
Pat. : )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top