MS Word text to Excel using Access

  • Thread starter Thread starter spences10
  • Start date Start date
S

spences10

Hi Friends,

I saw some of your posts - and I am hoping you can help me with
something i am trying to develop with Excel using Word as the data
source via Access.

If you will spare me the time, i will try to explain what i am trying
to do. i work for a credit team in bank and, we have a procedural
document used to take conditions of sanction from to be copied and
pasted into an intranet sanctioning tool. i have been tasked with
developing a user interface which - in my mind - will be a user-form
with the various header sections and tick boxes for the conditions of
sanction, which will then be a loaded into a user-form text box which
can be pasted into the intranet tool.

I was talking to a friend who happens to be a programmer and he said
that i should use Access to handle the Word doc as a database to then
interact with excel. I have been searching fore some reference
material with no real joy. can you point me in the right direction?

any help greatly appreciated.

thanks.

Scott
 
Hi Scott,

If you're just trying to get information out of a Word document and into
an Excel sheet, there's absolutely no advantage in bringing Access into
the picture. Develop the application in Excel or Word, whichever you're
more comfortable with - or you can use any .NET or OLE-compatible
language.

If it's a matter of extracting information from a Word document and
posting it to a web application, even Excel seems redundant.
 
Hi John,

Thanks for this.

The Word doc however Hugetastic - and the selected text will come from
various parts of the doc, making this approach quite time consuming.
Do you know of any code examples in excel which look at and take
sections of text from word?
 
Hi Scott,

Basically you just open the document and work with its properties, e.g.

Dim oDoc As Word.Document
Dim S As String

Set oDoc = GetObject("D:\folder\filename.doc")
With oDoc
S = .Paragraphs(1).Range.Text 'text of first paragraph
S = .Bookmarks("xxx").Range.Text 'text contained in bookmark 'xxx'
S = .Tables(1).Rows(1).Cells(1).Range.Text
'possibilities almost limitless
End With
oDoc.Close False

A great deal depends on how the document is structured. If it's been
properly designed for the purpose, it will be tightly structured and all
the information you need will be easily accessible: you just have to
know where it is. On the other hand if it's a loosely structured or
unstructured document with inconsistent formatting and layout,
extracting information can be a major computer science challenge.

If you go to http://word.mvps.org you'll find a lot of useful
information about Word, including programming it and automating it from
other applications. It's also worth searching for information on the
Microsoft website - though usually this is easier if you use Google than
the site's built-in search page. And of course there are the Word and
Excel programming newsgroups (microsoft.public.word.vba.general and
microsoft.public.excel.programming).
 
Back
Top