Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / November 2007

Tip: Looking for answers? Try searching our database.

Importing MS Access data into MS Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
H - 29 Nov 2007 10:59 GMT
In the thread "combining multiple address fields into 1 address field",
Stuart (?) helped solve that problem.

I then tried to set up a mail merge in Word to check how I could use and
merge the data.

I found the database tool bar and opened the appropriate database - but...
I could not find a way to open a particular table or query in order to
insert the fields from the query into Word.

The procedure I followed was this:

- open a blank word .doc
- from the database tool bar selected "insert database"
- a window opened, headed 'Database' and divided into 3 section:
   at the top a section titled "data source",
   a middle section titled "data options",
   a bottom section titled "insert the data into the document"

- "under "data source" I clicked "get data"
- a window  headed 'Select data source' opened

-  I navigated to the relevant database (mobmem07.mdb) and selected it.
- this added the database location to the "data source" part of the
'database' window

- I then looked at the "query options" section

I found I could not select a table or query from within the database I had
opened. Word had merely defaulted to opening one of the two tables in it.
The only querying I could do was on the table it had loaded from the
functions Word provided.

I could not find a way to open any other table let alone a query.

Moreover, I couldn't see a way of importing fields from the database table
that was supposed to be open!

Can you tell me what I'm doing wrong?

Regards,

Hal.
Keith Wilby - 29 Nov 2007 11:51 GMT
> In the thread "combining multiple address fields into 1 address field",
> Stuart (?) helped solve that problem.
[quoted text clipped - 35 lines]
>
> Can you tell me what I'm doing wrong?

Try attacking it from the other end and merge (push) the data into Word from
Access, rather than trying to pull it in from Word.  Search the Access help
for Mail Merge.

Keith.
H - 29 Nov 2007 12:17 GMT
Great, I've sussed it.

Many thanks,

Hal.

>> In the thread "combining multiple address fields into 1 address field",
>> Stuart (?) helped solve that problem.
[quoted text clipped - 42 lines]
>
> Keith.
Neil - 29 Nov 2007 13:59 GMT
Hi, Hal. I've done this before, and I can tell you that it works. It'll be
simpler to do it from Word, rather than opening Word from Access through
Automation.

Also, setting up a mail merge in Word from Access can be tricky to set up.
While accessing Word from Access through Automation isn't that difficult,
getting the Word merge settings right can be, depending upon what version
you're using. Even if you use Access to control the process, you'd still be
better off linking your Access data to Word within Word and then just
changing the data from Access and running the merge.

So if you're fine with going into Word and just attaching an Access
database, that would be simpler.

As for why it's not working, queries won't show up in the list. So it has to
be a table. When I've done this in the past, and I had to use a query, I
would first write the query output to a temporary table and then use the
temporary table in the merge.

As for why your tables aren't appearing, I can't really say. In the past,
I've always gotten a complete table list when I did this. You might want to
check in an MS Word newsgroup and see what they say. That would definitely
be a Word issue.

As for importing fields, the merge will import all fields from the table.
You can then select your fields in the document using the toolbar. If you
want to only import some fields, there is a custom SQL option in the Merge
dialogs that will allow you to specify the fields, if that's what you want
to do.

Neil

> In the thread "combining multiple address fields into 1 address field",
> Stuart (?) helped solve that problem.
[quoted text clipped - 39 lines]
>
> Hal.
H - 29 Nov 2007 16:04 GMT
> Hi, Hal. I've done this before, and I can tell you that it works. It'll be
> simpler to do it from Word, rather than opening Word from Access through
> Automation.

That's what I thought!

> Also, setting up a mail merge in Word from Access can be tricky to set up.
> While accessing Word from Access through Automation isn't that difficult,
> getting the Word merge settings right can be, depending upon what version
> you're using. Even if you use Access to control the process, you'd still
> be better off linking your Access data to Word within Word and then just
> changing the data from Access and running the merge.

Wgat I did was to export a merge .txt file of the query results, opened that
in Word and selected the fields from that.

It seems unneccesarily long winded and if one had a great number of records
would create a massive file. So, while in one sense I have got the data into
Word in a test scenario - it's certainly not in the way I would want to use
it in earnest.

> So if you're fine with going into Word and just attaching an Access
> database, that would be simpler.

You'd have thought it - but it doesn't seem that way to me at the moment!

> As for why it's not working, queries won't show up in the list. So it has
> to be a table. When I've done this in the past, and I had to use a query,
> I would first write the query output to a temporary table and then use the
> temporary table in the merge.

As I mentioned I have 2 tables but only 1 shows - queries don't show at all
as you say.

> As for why your tables aren't appearing, I can't really say. In the past,
> I've always gotten a complete table list when I did this. You might want
> to check in an MS Word newsgroup and see what they say. That would
> definitely be a Word issue.

I'll get me coat.

> As for importing fields, the merge will import all fields from the table.
> You can then select your fields in the document using the toolbar. If you
> want to only import some fields, there is a custom SQL option in the Merge
> dialogs that will allow you to specify the fields, if that's what you want
> to do.

I haven't needed to merge stuff in years and would have thought things would
have become much easier. I can't understand why MS make merging such a
difficult feature to use. Ah well, I better pack my bags and camp out in the
Word group for a while.

> Neil

Hal.
Neil - 29 Nov 2007 17:33 GMT
> Wgat I did was to export a merge .txt file of the query results, opened
> that
> in Word and selected the fields from that.

Well, that's not too bad of a process. If you keep your filename the same
each time, you can just keep that linked to your merge doc. I don't know if
you're going to run this from Access or Word, but if you run it from Access,
you can just delete the file when you're done. Either way, as long as you
overwrite the same file each time, it shouldn't take up too much disk space.

If all your data's in one table, then it would be better to use that.
Otherwise, if you're taking it from a query, then you'd have to output to
something anyway, whether a file or a temporary table. So it's pretty much
the same.

But, do you mind if I ask why you're using Word instead of just doing an
Access report? If you can do it entirely in Access and avoid Word altogether
that would, of course, be the best solution.

> As I mentioned I have 2 tables but only 1 shows - queries don't show at
> all as you say.

Make sure the tables are all closed. Could be that if the table's open that
Word doesn't show it in the list. In fact, close your database altogether
and see what tables show.

> I haven't needed to merge stuff in years and would have thought things
> would have become much easier. I can't understand why MS make merging such
> a difficult feature to use. Ah well, I better pack my bags and camp out in
> the Word group for a while.

I think most of the Word merge stuff is intended to be used within Word.
Getting data from an external source is considered by MS, I guess, to be
something extra. That's just a guess anyway. But I agree it should be
better.

Neil
Rick A.B. - 30 Nov 2007 13:31 GMT
> In the thread "combining multiple address fields into 1 address field",
> Stuart (?) helped solve that problem.
[quoted text clipped - 39 lines]
>
> Hal.

Hal,

Check out Albert Kallal's Super Easy word merge at
http://www.members.shaw.ca/AlbertKallal/wordmerge/
it will be worth your time.
Rick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.