Dump field contents in "TO" line of an email.

K

Karen Hart

In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?

Many thanks in advance.
Cheers,
Karen
 
A

AlCamp

Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp
 
K

Karen Hart

Al,
Thanks so much. I ventured out with this, which was my best guess, but it
wasn't exactly crazy about it:

Private Sub Email_DblClick(Cancel As Integer)

DoCmd.SendObject acSendNoObject, , , [EmailAddress]

End Sub

Do you mind giving me another little push? :)


AlCamp said:
Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp

Karen Hart said:
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?

Many thanks in advance.
Cheers,
Karen
 
K

Karen Hart

Hmm, I continued trying, and used Macro instead of code. I left everything
blank except the TO argument, where I put [EmailAddress]. It immediately
started sending email. All I want it to do is open the email program and
type the contents of the TO line into the email screen. Is that possible?

Thanks again,
Karen


AlCamp said:
Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp

Karen Hart said:
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?

Many thanks in advance.
Cheers,
Karen
 
R

Rick Brandt

Karen said:
Hmm, I continued trying, and used Macro instead of code. I left
everything blank except the TO argument, where I put [EmailAddress]. It
immediately started sending email. All I want it to do is open
the email program and type the contents of the TO line into the email
screen. Is that possible?

The first argument for SendObject determines whether the message is dispayed on
screen or sent automatically.
 
A

AlCamp

Karen,
Your original post was...
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?
Then use...
DoCmd.SendObject , , , [EmailAddress]
and your email program will come up with the TO filled in.

Then you posted...
All I want it to do is open the email program and type the contents of the
TO line into the email screen.
Then use...
DoCmd.SendObject
and your email program will come up WITHOUT the TO filled in.

Any more problems... then include your code.

hth
Al Camp



Karen Hart said:
Hmm, I continued trying, and used Macro instead of code. I left
everything blank except the TO argument, where I put [EmailAddress]. It
immediately started sending email. All I want it to do is open the email
program and type the contents of the TO line into the email screen. Is
that possible?

Thanks again,
Karen


AlCamp said:
Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp

Karen Hart said:
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the
"TO" line of the default email program?

Many thanks in advance.
Cheers,
Karen
 
K

Karen Hart

Sorry to fire off a reply before I had experimented further.
I created this macro which does everything I want:

Action: SendObject
Arguments:
To: =[EmailAddress]
Edit Message: Yes

Thanks so much for your guidance.
Happy new year!
Karen

AlCamp said:
Karen,
Your original post was...
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?
Then use...
DoCmd.SendObject , , , [EmailAddress]
and your email program will come up with the TO filled in.

Then you posted...
All I want it to do is open the email program and type the contents of the
TO line into the email screen.
Then use...
DoCmd.SendObject
and your email program will come up WITHOUT the TO filled in.

Any more problems... then include your code.

hth
Al Camp



Karen Hart said:
Hmm, I continued trying, and used Macro instead of code. I left
everything blank except the TO argument, where I put [EmailAddress]. It
immediately started sending email. All I want it to do is open the email
program and type the contents of the TO line into the email screen. Is
that possible?

Thanks again,
Karen


AlCamp said:
Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp

In Access XP, does anyone know how can I double-click the
[EmailAddress] field of a form and have it copy the contents of that
field into the "TO" line of the default email program?

Many thanks in advance.
Cheers,
Karen
 
A

AlCamp

OK Karen,
I never use macros... I want all my code in one place.
But, if the macro works... I won't argue with success.
Al Camp

Karen Hart said:
Sorry to fire off a reply before I had experimented further.
I created this macro which does everything I want:

Action: SendObject
Arguments:
To: =[EmailAddress]
Edit Message: Yes

Thanks so much for your guidance.
Happy new year!
Karen

AlCamp said:
Karen,
Your original post was...
In Access XP, does anyone know how can I double-click the [EmailAddress]
field of a form and have it copy the contents of that field into the "TO"
line of the default email program?
Then use...
DoCmd.SendObject , , , [EmailAddress]
and your email program will come up with the TO filled in.

Then you posted...
All I want it to do is open the email program and type the contents of
the TO line into the email screen.
Then use...
DoCmd.SendObject
and your email program will come up WITHOUT the TO filled in.

Any more problems... then include your code.

hth
Al Camp



Karen Hart said:
Hmm, I continued trying, and used Macro instead of code. I left
everything blank except the TO argument, where I put [EmailAddress]. It
immediately started sending email. All I want it to do is open the
email program and type the contents of the TO line into the email
screen. Is that possible?

Thanks again,
Karen


Karen,
Use the SendObject Method, and use [EmailAddress] as the TO argument
hth
Al Camp

In Access XP, does anyone know how can I double-click the
[EmailAddress] field of a form and have it copy the contents of that
field into the "TO" line of the default email program?

Many thanks in advance.
Cheers,
Karen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top