473,394 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Open user email program from database on server

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

Mar 29 '06 #1
3 1852
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

Mar 29 '06 #2
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

Mar 30 '06 #3
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

Mar 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dave | last post by:
I reinstalled SQL 2000 server after reformatting my drive. Now I cannot open a database in my C## program as before. If I use "Provider=SQLOLEDB;Data Source=localhost; Initial...
0
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
2
by: Mr.KisS | last post by:
Hello. I'm under Windows XP PRO SP1, IIS 5.1 ans SQL SERVER 2005 Express. When i try to open a connexion with : <connectionStrings> <add name="AppCnxStr"...
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.