Hi everybody! new member (1 Viewer)

sbrown106

Member
Local time
Today, 08:30
Joined
Feb 6, 2021
Messages
77
Hi there,

First time visiting this site - nice to meet you all!

I am from the UK, live in Liverpool and my hobbies are mostly sports. Cycling and football mainly.

Recently had a bit of a job change within my company, so now moving from excel to database design in MS Access.
so the database stuff is a bit new to me. I am getting to grips
with Access a bit though - but struggling when cleverer stuff needs doing (VBA) , so trying to learn that
now - so this is new to me!

Looking forward to chatting to you all!
 

Jon

Access World Site Owner
Staff member
Local time
Today, 08:30
Joined
Sep 28, 1999
Messages
7,303
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

Here are just a couple of tips for you:

1. Feel free to ask any question you like, however basic you may feel it is, or even if it has been answered before. Our expert members thrive on helping you out!

2. If you prefer a dark theme to the forums, just go to the bottom left of this forum and click "Default style". You will then see a selection of themes to choose from. I like Shades of Blue. :)

3. If you like any of the answers you get, feel free to click the "Like" link on the bottom right hand corner of the post. If you hover over the Like link, you can even choose the type of smiley.

Above all, hang around here, have fun, learn stuff and join in.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:30
Joined
Feb 28, 2001
Messages
26,996
Hello, sbrown106, and welcome.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:30
Joined
Oct 29, 2018
Messages
21,357
Hi. Welcome to AWF!
 

sbrown106

Member
Local time
Today, 08:30
Joined
Feb 6, 2021
Messages
77
Hi everybody and thanks for the welcome! its good to be here.

I have a question on how to import MS words into a table in Access. Just thinking maybe I'm on the wrong forum! - think I need VBA for this
But if anybody can give me any help I'd be very grateful. Ive attached a small sample word form that I would like to pull into Access with the titles as fields
 

Attachments

  • Test.txt
    227 bytes · Views: 496

jdraw

Super Moderator
Staff member
Local time
Today, 04:30
Joined
Jan 23, 2006
Messages
15,361
Welcome aboard sbrown106!
What exactly do you want to do with the word data?
Are there more records? Is there an application involved? Some business process(es)?
 

sbrown106

Member
Local time
Today, 08:30
Joined
Feb 6, 2021
Messages
77
Welcome aboard sbrown106!
What exactly do you want to do with the word data?
Are there more records? Is there an application involved? Some business process(es)?
Hi,

Ideally I need to look over an email folder, with lots of attached MS Word forms and get Access to open each attachment and pull the data in from the form, taking data from headings in the form such as NAME, ADDRESS,DOB etc and read the into field headings in Access (the data in the MS Word form isnt in the form of a table and fields havent been created in MS Word to store data entries~), but wouldn't know where to start with that.
So at the moment just trying to use vba to read data from a single downloaded MWS Word form into a table, and then pull that into Access, at least doing one form at a time with some code would be quicker than me copying and pasting each field in the form into Access.

Thanks for the reply hope that make sense,
Stephen.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:30
Joined
May 7, 2009
Messages
19,169
that is a text file?
if it is real Word doc, as an example, create one and paste what is in test.txt to word doc.
on word, press alt-F11 (to invoke VBA).
on menu, Insert->Module.
paste this code.
press Ctrl-G, to show immediate window (if not showing).
click on "sub t()" (anywhere inside the sub).
press F5 (run).
you will see in immediate window that it can
extract (line by line) the info you need.
Code:
' http://computer-programming-forum.com/1-vba/0d5933b36136c83a.htm
' post #5/5
'
Private Sub t()
    Dim i&, x&, indhold$
  ' Move the insertion point to the beginning of the document.
      Selection.HomeKey Unit:=wdStory, Extend:=wdMove
      ' Loop number of lines in document.
       x = ActiveDocument.BuiltInDocumentProperties("NUMBER OF LINES")
      For i = 1 To x
         ' Select a line.
         ActiveDocument.Bookmarks("\LINE").Select
         indhold = Trim$(Selection)
        'here you can do whatever you want to the line contained in the var. Indhold
        ' Display line number. Just for test reasons, don't do it on your 150.000 lines new book manuscript ;-)
         'MsgBox "Line: " & i
         ' Move to next line.
        Debug.Print i; indhold
         Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdMove
      Next i
End Sub

withing Access, you will do just the same, except you will work on Word.Application object.
 

Users who are viewing this thread

Top Bottom