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 / March 2006

Tip: Looking for answers? Try searching our database.

Open user email program from database on server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
trynittee@lycos.com - 29 Mar 2006 21:56 GMT
Hello,

Thank you so much in advance to those who will take the time to read
and answer.  This group is a wonderful site.

I have inherited a contacts database that sits on a server.  Users
logon to the server and have access to the front-end of this split
database (backend is used by one admin person - good set-up).

One of the wishlist features that I am wanting to implement is for a
user to find a contact and then through a hyperlink, click on the
contact's email address and be able to send an email.

Now I have it set up to work right now, but it uses the default email
program on the server.  That won't work as it would send from the
server email, not the user's email account.  And then if someone were
to respond, it would go back to the server... yada yada. It's not the
full solution.

What I need is a way to have the link stepout of the server and
reference the email program (Outlook) on the user's computer and then
the code will take over from there.

I am an intermediate user.  I don't write VB code.

Can someone give me a point in the right direction?  First, is it
possible given my limitation writing code?  What functions, event
procedures would be able to set this up?

I imagine I will be dealing with the server path....

Thank you very much,

Clare
Ron2005 - 29 Mar 2006 22:41 GMT
The following should call outlook on the user's pc.  It is worth a
try.....

in the onclick event of a button to send email

Here is an example:
Set o = CreateObject("Outlook.Application")

Set m = o.CreateItem(0)
m.To = "Paul Tucker" ' The distribution list name goes here
m.Subject = "SUPP Analysis Spreadsheet "
m.body = Chr(13) & Chr(13) & _
" Date: " & date & Chr(13) & _
Chr(13)
m.attachments.Add ReportDir & exportName ' point to the full address of
attachment here
' There can be multiple of the above

' m.display ' display shows email and the user has to press send button

m.send ' Send does it automatically with security from Outlook

'   You want to use m.display to open the email and have the user send
it.
' you want to use me.send to start the send process - however MS
Outlook security
' will ask for the user's OK to actually send the email.

' I believe that the next two instructions should be

set m to nothing
and possibly
set o to nothing

'not sure on the above.
==========================

The trick will be accessing the email address. I am not sure what you
mean by hyperlink to the email address in your description. But if the
address is a field in the file or at least on the form the above will
work

Ron
trynittee@lycos.com - 30 Mar 2006 21:46 GMT
Ron,

Thank you for your answer.  I have read through it and I don't see
where the code is going to back reference or figure out:
-not to use the email program on the server
- and to use the email program on the user's computer.

The database sits on a server.  Each user has a link on their desktop
that enables them to access the server.  After a password prompt, the
database appears on their screen.

I have the following code on the click event of a label that sits right
beside the email text field.  The code is as follows:

Private Sub lblHyperLink_Click()
Dim strMail As String
strMail = "#MailTo:" & Me.EMAIL & "#"
Application.FollowHyperlink HyperlinkPart(strMail, acAddress)
End Sub

It works well - except - it pulls up an email and puts in the email
address on the server email program.  It is not accurate to have this
situation.  I want the code to decipher that it is not to use the email
program on the server, but to access or decipher or reference the email
program on the user's computer.  In that way, when the user sends the
email, it comes from the user, not the server's email.  Basically, I
want the Focus to move from the server environment back to the user's
environment and to use the user's email address.

I am guessing I need to find the server path, and then from there find
the path to the user's computer through the network.  I am imagining
there is code that can determine what user/what computer is
current/asking and then use the answer to that query to fill in the
path that will put the point of reference back to the user's computer
instead of being on the server.... all this while holding the email
address and plunking that into the email message when done.

When the user hits SEND, they will have left the database on the
server, so that's another story.  For now, I just need to get the
SetFocus (for lack of better wording), to back out of the server and
focus on the user's computer.

Any comments and insights are very appreciated.

Clare Allan
Ron2005 - 31 Mar 2006 15:58 GMT
I have never attempted to call the email program using a hyperlink.

I gues I am suggesting that since you have the email address then try
the code I posted. It will call outlook specifically, so then it is a
question of where the individual PC will resolve that call.

I will think about it for a while to see if anything comes to mind.

Ron
 
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.