|
-
Oct 9th, 2000, 03:58 AM
#1
Thread Starter
Member
Using VBA in Word97 to code a macro, I am using the DoCmd.TransferText to import a text file into an Access database.
My problem is - when I run the macro again after the first time, the data appends to my existing table, but I want it to overwrite the existing table.
Are there any arguments to the TransferText command that overwrites a table if the same table name is specified?
-
Oct 9th, 2000, 05:52 AM
#2
Addicted Member
First use the range.select command of the activedocument within word.
After that you enter your code where the data is transfered.
This would result in:
ActiveDocument.Range.Select
DoCmd.TransferText
And that should be it.
Catch you later,
Jeroen Hoekemeijer
Code:
If 1 = 2 Then MajorError
-
Oct 10th, 2000, 05:33 AM
#3
Thread Starter
Member
Re: TransferText (Word to Access)
I have managed to export selected text from Word into an Access table, but my problem is everytime I want to do export to the SAME table I want the selected text to OVERWRITE the table and not append the text underneath the existing data.
I hope that is a little clearer. Any suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|