Re: File Copy / Save in Access: Is it Possible?



Swinky <swinkelman@xxxxxxxx> wrote in
news:1184164977.080948.43730@xxxxxxxxxxxxxxxxxxxxxxxxxxx:

My manager threw out the gaunlet and I'm at a loss how to
accomplish this or if it's even possible within the Access
environment.

Challenge: While having Access open, locate a file on the
network, automatically make a copy of that file and
(automatically) save the copy in a specific folder on the
network. At the same time all this happens, a link is created
in the Access database to the copied file.

Challenge Comments: Each file will have a unique name & will
be in a different location (can be on desktop or network
location). To make it even more challenging, the file could
be an Outlook email (the process would then be to locate the
specific email in Outlook, copy it as a .msg file and store
the copy in a specific folder). It would be acceptable to have
two different control buttons (one for a file on the network &
the other for an email) to do the work

I found the API code to get the File Open/Save dialog box, but
that isn't exactly going to accomplish what I need to do. My
manager wants all of this to be automated using code (either
behind the scenes or with a Click & Drag dialog box if set up
properly to make it as easy as possible).

Can anyone tell me if any of this is possible and if so, how?
One more thing...I am a novice (I use that word loosely) at
VBA or ANY programming at all (I just bought the book "Access
2003 VBA Programmers Reference" to try to pick up VBA).

Possible solutions (in order of preference):

1. VBA code that will handle it all
2. Canned software designed to do this in an Access
environment 3. Hire a consultant to do the work (what would be
the scope & cost of doing this?)
4. No solution...it can't be done.

All ideas are appreciated.

Start with the File dialog, you can upgrade to something more
sophisticated later.

Once you have a fully qualified filename, parse out the
extension, then use the filecopy statement to put that file in a
predefined directory, with a new name based on the record's
primary key (usually an autonumber) & the extension.,

e.g.
txtMyextension = mid(Fromfile,len(myfile) -3)
TxtMyPath = C:\dBdata\attachments\"

FileCopy Fromfile, txtMyPath & format(pk,"00000000") & "." &
txtExtension

Update the record in the table with the new name and extension.

Once you have that section working, you can experiment with
alternative methods of obtaining the fully qualified filename,
for example using the Outlook api..

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • File Copy / Save in Access: Is it Possible?
    ... My manager threw out the gaunlet and I'm at a loss how to accomplish ... While having Access open, locate a file on the network, ... programming at all (I just bought the book "Access 2003 VBA ... Canned software designed to do this in an Access environment ...
    (comp.databases.ms-access)
  • Re: Reinforcement Learning
    ... build its own modules in response to its environment ... cease functioning when you, acting as the designer, ... stop pressing the reward button. ... The brain is clearly some kind of network or family ...
    (comp.ai.philosophy)
  • Re: 50 years later, Marvin Minsky still doesnt get it
    ... environment merely by observing the neural "code" and knowing the ... The first step would in effect be decoding raw sensory data into ... The first half I called the input network. ... For example, when we see a dog, and know that it's a dog, it's not because ...
    (comp.ai.philosophy)
  • Re: Usefulness of Network Intrusion Detection Systems
    ... >track of application data sent over the network as well ... Different applications and protocols present different ... You're forgetting that the IDP may stop the exploit attempting to ... in a university environment where we basically have 15,000 home ...
    (Focus-IDS)
  • Re: Privilege-escalation attacks on NT-based Windows are unfixable
    ... >>> a well secured network. ... >> So you're basically saying that local privilege escalation doesn't ... > environment, this weakness is well behind other, like user writing down ... > security facilities ...
    (comp.security.misc)