Word97 document -> Access97 records 
Author Message
 Word97 document -> Access97 records

I am looking to do the opposite of most.  I have been given numbers of Word
documents and need to convert those to Access records.  The format of the
documents is pretty much the same.  Anybody have any experience in doing
this?

Thanks!

Jeff Shanker



Fri, 05 Jul 2002 03:00:00 GMT  
 Word97 document -> Access97 records
Hi Jeff,

In the vbe, you have to choose References on the Tools menu and set a
reference to DAO 3.51. Then you can establish a connection to your database
from within your Word VBA code.

Here's some code that takes data stored in vba variables within Word and
plunks them into Fields 1, 2, 3, and 4 in Table1 of an access database:

'add new records
Set db = OpenDatabase(DatabaseFolder & DatabaseName)
Set rs = db.OpenRecordset("SELECT * FROM Table1 WHERE Field1=" & PVC_ID,
dbOpenDynaset)
For LoopCounter = 0 To MO_DataCounter - 1
With rs
 .AddNew
 .Fields("Field1") = PVC_ID
 .Fields("Field2") = MODEL_YEAR
 .Fields("Field3") = Format(LoopCounter + 1)
 .Fields("Field4") = MO_DataString(LoopCounter)
 .Update
 .Bookmark = .LastModified
End With
Next LoopCounter
rs.Close
db.Close

--
Bill Coan
Microsoft Word MVP
Neenah WI 54956 USA
http://www.wordmacros.com
. . .

Quote:
> I am looking to do the opposite of most.  I have been given numbers of
Word
> documents and need to convert those to Access records.  The format of the
> documents is pretty much the same.  Anybody have any experience in doing
> this?

> Thanks!

> Jeff Shanker




Fri, 05 Jul 2002 03:00:00 GMT  
 Word97 document -> Access97 records
Hi Jeff,

Quote:
> I am looking to do the opposite of most.  I have been given numbers of Word
> documents and need to convert those to Access records.  The format of the
> documents is pretty much the same.

Could you describe it, please? Also, which version of Word and Access are we
talking about?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Fri, 05 Jul 2002 03:00:00 GMT  
 Word97 document -> Access97 records
Cindy:

I have many documents that have information in it that I need to extract and
create Access records with the information.  These documents have no tables
or any other special formatting in them.  I am using Word97 and Access97.
Thank you for your help!

Jeff



Quote:
> Hi Jeff,

> > I am looking to do the opposite of most.  I have been given numbers of
Word
> > documents and need to convert those to Access records.  The format of
the
> > documents is pretty much the same.

> Could you describe it, please? Also, which version of Word and Access are
we
> talking about?

> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister
> http://go.compuserve.com/MSOfficeForum

> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)



Sat, 06 Jul 2002 03:00:00 GMT  
 Word97 document -> Access97 records
Hi Jeff,

Sorry for the delayed reply. Got busy...then there have been so many messages
to wade through!

Quote:
> I have many documents that have information in it that I need to extract and
> create Access records with the information.  These documents have no tables
> or any other special formatting in them.  I am using Word97 and Access97.

In order to automate extracting information, you first have to have some way
of identifying it. But you have to tell us - you know the documents...

In your first messages you state: "The format of the documents is pretty much
the same."

In what regards is it the same (keeping in mind you need to realte it to
different data fields for Access)?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Wed, 17 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Print Word97 document from Access97

2. Access97->Word97 merge, buffer overflow?

3. Word97 -> Access97

4. Displaying ACCESS97 forms (switchboard) in WORD97 Document

5. connecting Word97 <----> Access97

6. Word97 -> Access97

7. Closing Word97 from Access97

8. Pulling Access97 data into Word97 variables

9. Editing an Access97 field value from Word97

10. Access97-Word97 Mail Merge

11. Access97/Word97/data exchange HELP!!!

12. Access97/Word97 MailMerge

 

 
Powered by phpBB® Forum Software