Shamil Salakhetdinov
shamil at smsconsulting.spb.ru
Thu Dec 2 06:33:15 CST 2010
Hi Pedro --
Just "quick&dirty - extend it yourself" sample - mainly recorded in MS Word
then wrapped into a sub:
Public Sub ReplaceTabs(ByRef rdoc As Word.Document)
Dim wapp As Word.Application
Set wapp = rdoc.Application
rdoc.Select
With wapp.Selection.Find
.Text = "^t"
.Replacement.Text = ";"
.Forward = True
.Wrap = 1 'wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
wapp.Selection.Find.Execute Replace:=2 'wdReplaceAll
Set wapp = Nothing
End Sub
Thank you.
--
Shamil
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of pedro at plex.nl
Sent: 2 ??????? 2010 ?. 12:55
To: accessd at databaseadvisors.com
Subject: [AccessD] MS-Word import into Access
I have to import data from MS-Word documents into Acces.
The data in the documents are four text-parts, and between them are one ore
more tabs.
Because of the difference in tabs, i can use replace, but i have many
documents, so it would take days to do that.
Is there a code that i could use as a macro in MS-Word to delete one ore
more tabs and replace them with ";".
Not really an Access problem, i'll hope that it is no problem to post it
here
Thanks
Pedro
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com