Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook

Status
Not open for further replies.

AlastairOz

Technical User
Jul 27, 2010
81
0
0
AU
Just having a look at Outlook as here:
faq184-3894

Our server has multiple user accounts.

How do I work with messages from different user accounts?

What I would like to do is save all attachments to a directory from 1 particular account:
I would probably set up an email account for the VFP app,
so the company employees can send documents to the VFP app.
Then the app user will have a list of new docs to process.
(For instance purchase orders)
 
Try this:
Code:
oOutlook = createo("outlook.application")
oNameSpace = oOutlook.getnamespace('MAPI')
oNameSpace.Logon(<<profile>>,<<password>>
etc...


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
Thanks Mike,

I guess before I get too far with this, perhaps I should be asking
for some advice on which way to proceed.
My app will be installed on our Windows Server 2008.
All users access their windows user account using Remote Desktop.
We have Microsoft Exchange installed to handle the emails.
Outlook is used for the users email client.

So each user starts a new instance of the VFP app located on the server.
What I would like to do is have the users forward emails and
attachments to a specific location where each item will be each saved as a file with a GUID name, and a corresponding entry created in a table.
I already have a table setup and I am saving PDF's created in my app to this folder, as above.

So I was thinking to create a new email account on the Exchange Server,
eg myapp@myplace.com,
but will I run into trouble with having multiple instances of my VFP app running? All trying to retrieve email message
form the same email address? Possibly at the same time?
For instance, I would have to write code somewhere, say when the app is started to check the messages and create the entries.

Not sure if any of this is making any sense:
Some advice on the direction I should take would be greatly
appreciated.
Note: I am new to all of this, and only started creating my first VFP app recently, so go easy on me please.

The other way (and much simpler), would be to have a directory on the server, where users can save docs to.
Or have a shortcut on the desktop, and drag n drop the files
into the directory.
A user of my VFP app could then access and process these in just the
same way.

Regards

Alastair






 
Just some thoughts on this: The second idea to handle a directory of files, would be much easier than to go through mail accounts. As long as this does not have another reason, eg to send out attachments or heavily using outlook as a repository for files (which I think would be a misuse of outlook accounts), there is no reason to automate outlook for internal file storage.

If there is a strong reason to handle all this within mail accounts, then the VFP would perhaps better automate the exchange server instead of outlook clients.

If the final destination is saving files to a location, then the question is, can't the vfp app on the server access to destination folders or why would you distribute files via mail? If you talk of a LAN then just simply COPY FILEs, as long as the VFP app has the required access to network shares.

If we talk about remote locations a more natural way to distribute files is to FTP them to remote servers or use more secure SFTP or FTPS.

Bye, Olaf.
 
Hi Olaf,
Its a mixture of both really. Some files are created to be
stored for later retrieval. (PDF,excel or Word doc)
I have that working OK right now.

Some files created in VFP app will need to be emailed out.
All incoming files including faxes, are emails or email attachments.
I just want to make it easy for the user, plus, our staff use
emailing as a "to-do" list, and "proof" of task done.

A folder on the desktop is still a good idea. Email attachments
can be dragged straight from the email to the folder no problem.

Appreciate the feedback
Regards

Alastair
 
I have been looking at Outlook automation.
I have not been able to find a way to get new emails.
Unread, read OK, but how do I get outlook to check for new
messages?

Alastair
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top