Sending Email (1 Viewer)

Maestro

Registered User.
Local time
Today, 23:10
Joined
Jun 16, 2001
Messages
21
My database holds the details of all the members of a club. I would like to add a button to the form that, when clicked, opens up a new message window in Outlook Express (not Outlook) with the email address of that particular member already entered. Not entirely sure how to go about doing this?

On a similar subject I have some merged word files stored in the same directory as the d/base. It would be nice to have a button on the database interface that opens the document, but again I've no idea how...

I'm relatively new to access and what I know about VB etc. is limited, to put it mildly. Any suggestions welcome!
 

jimbrooking

Registered User.
Local time
Today, 18:10
Joined
Apr 28, 2001
Messages
210
To email something check out the SendObject Method. Something with (IMHO) more power and flexibility is the Collaborative Data Object for NT Servers - a mouthfull, but a Google search for the two words CDONTS newmail will find info about it. CDONTS requires that your IIS server be set up to recognize your MS Exchange Server, but that's not hard for the NT administrator to do.

I can't help with the question about opening a Word doc't; sorry....

Jim
 

MissCLuvr

New member
Local time
Today, 23:10
Joined
May 16, 2001
Messages
9
Maestro,
To get to the document you have linked to the database. I would create a macro to RunApp and on the Command line type the path where your document is located: C:\WINDOWS\Application Data\Microsoft\O...\Office.doc

After that go to the form you want to pull the macro from and create a command button.

That might be the simple way to do it but it works.

MissC
 

Maestro

Registered User.
Local time
Today, 23:10
Joined
Jun 16, 2001
Messages
21
A good idea but unfortunately it doesn't work like that - if only life were so easy! When I tried RunApp it would only recognise paths pointing to .exe files, anything else just threw up an error message.

I tried making use of the example given in the downloadable example forms on Microsoft's website for opening a document from a text box, but still it's only resulting in an error. In fact anything on my d/b where an [event procedure] is involved comes up with a complaint about 'labels_click', even when it's been created using the wizards. There's something not right, wish I could pinpoint what it is...
 

paulmcdonnell

Ready to Help
Local time
Today, 23:10
Joined
Apr 11, 2001
Messages
167
Maestro,

Had a similar problem myself once .. this is how guru talismanic saved the day...
{If you don't want to use express then make sure that your default email program is outlook. You can set this through options in your web browser)

-----
Put this in the event that you want to trigger the email
DoCmd.SendObject , , , Me.txtEmail, , , "YourSubject", "YourText", True

Then just replace the Me.txtEmail with Me.YourTxtBox that holds the email address.

If you want to use a subject line, or message text from a control (text box) you can substitute: (note the absense of the quotes when you use Me.AnyThing)

"YourSubject" with Me.YourSubject (replace your subject with your text box name)

"YourText" with Me.YourText (replace your subject with your text box name)

If you only want to use the email then leave the subject and message blank, just leave the empty commas.
 

Users who are viewing this thread

Top Bottom