Paste to report from a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to type in a filename and have Access go get the file and
paste its contents into an Access report. I don't need to do any
manipulation of the report in Access, it just has to be there. The files
would usually be Word documents, but might also be Excel spreadsheets.
 
Carol Grismore said:
I want to be able to type in a filename and have Access go get the file and
paste its contents into an Access report. I don't need to do any
manipulation of the report in Access, it just has to be there. The files
would usually be Word documents, but might also be Excel spreadsheets.

Hi Carol!

Ok, so you would need to include in the references of your Access project
(from the code window, tools, references) the Microsoft Word object and the
Microsoft Excel object.

Once you have those references, you can start to manipulate those type of
documents. You can use something like this:

dim myWord as Word.Document
set myWord = CreateObject(path, type)

then you can continue doing what you want... :)

Antoine
Orchus Technologies
 
Thank you for your truly useful answer! To reward you, here is a follow-up
question:

If I leave the database on the server, and allow multiple users, the
references will stay with the database -- I know that -- and I'm assuming
that as long as the users of the database have Word and Excel, the references
will work. Is that a valid assumption?
 
Yup

Carol Grismore said:
Thank you for your truly useful answer! To reward you, here is a follow-up
question:

If I leave the database on the server, and allow multiple users, the
references will stay with the database -- I know that -- and I'm assuming
that as long as the users of the database have Word and Excel, the references
will work. Is that a valid assumption?
 
Carol said:
Thank you for your truly useful answer! To reward you, here is a follow-up
question:

If I leave the database on the server, and allow multiple users, the
references will stay with the database -- I know that -- and I'm assuming
that as long as the users of the database have Word and Excel, the references
will work. Is that a valid assumption?


Your logic is correct, but your premise is flawed. You
should never let multiple users run the same mdb file at the
same time.

The typical arrangement is to split your database into a
"back end" mdb file with all the tables and a "front end"
mdb with everything except the tables. The back end is
placed on the server, but a copy of the front end is placed
on each user's machine.
 
True enough, but then you open the door to a maintenance nightmare. Who has
the app on their PC? How do you "force" an update when the front-end code is
changed? That becomes a real problem.
 
I think the maintenance nightmare is when you do not split
the file. How to you perform the most common ganges such as
a simple change to a form without endangering the data
tables.

There are several approaches to updating the front end
without touching the back end. The simplest, although most
tedious, is to just go to each machine and copy the new
front end from a central location. If that's impractical,
then use a desktop icon script or program to check if a new
fron end is available before running the local front end.

For a pretty thorough discussion on this topic along with a
full blown utility that takes care of things for you see:
http://www.granite.ab.ca/access/autofe.htm
 
Back
Top