Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Email to from Excel

Hi,
I have created a database for my company to use. I am looking for a code or
routine to help me on the following:
An email address is shown on the cell D12
I have written a code to change the cell contents from formula to email.
I would like a button to copy the email address and open outlook to create
an email to the specific address shown. I can do the rest but i am really
stuck on this one.
If outlook is open, it may need an error handler to stop a second instance
opening.

Summary:
i select my contact,
press a button,
outlook opens and the email address is in the "send to"

Regards,

Nigel

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Email to from Excel

See http://ww.rondebruin.nl/sendmail.htm where this is covered.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
I have created a database for my company to use. I am looking for a code

or
routine to help me on the following:
An email address is shown on the cell D12
I have written a code to change the cell contents from formula to email.
I would like a button to copy the email address and open outlook to create
an email to the specific address shown. I can do the rest but i am really
stuck on this one.
If outlook is open, it may need an error handler to stop a second instance
opening.

Summary:
i select my contact,
press a button,
outlook opens and the email address is in the "send to"

Regards,

Nigel



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Email to from Excel

Hi,
There doesnt seem to be what i am looking for. it seems that everything on
the site will automatically send a sheet or a book. i only want to open
outlook to send my own email with my own subject etc. unless i am not seeing
something.

nige

"Bob Phillips" wrote:

See http://ww.rondebruin.nl/sendmail.htm where this is covered.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
I have created a database for my company to use. I am looking for a code

or
routine to help me on the following:
An email address is shown on the cell D12
I have written a code to change the cell contents from formula to email.
I would like a button to copy the email address and open outlook to create
an email to the specific address shown. I can do the rest but i am really
stuck on this one.
If outlook is open, it may need an error handler to stop a second instance
opening.

Summary:
i select my contact,
press a button,
outlook opens and the email address is in the "send to"

Regards,

Nigel




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Email to from Excel

Just modify the code so it doesn't send or add an attachment. The basic
code you need is there.

--
Regards,
Tom Ogilvy

"Nigel" wrote in message
...
Hi,
There doesnt seem to be what i am looking for. it seems that everything on
the site will automatically send a sheet or a book. i only want to open
outlook to send my own email with my own subject etc. unless i am not

seeing
something.

nige

"Bob Phillips" wrote:

See http://ww.rondebruin.nl/sendmail.htm where this is covered.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
I have created a database for my company to use. I am looking for a

code
or
routine to help me on the following:
An email address is shown on the cell D12
I have written a code to change the cell contents from formula to

email.
I would like a button to copy the email address and open outlook to

create
an email to the specific address shown. I can do the rest but i am

really
stuck on this one.
If outlook is open, it may need an error handler to stop a second

instance
opening.

Summary:
i select my contact,
press a button,
outlook opens and the email address is in the "send to"

Regards,

Nigel






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Email to from Excel

Here is the basic code

Sub SendEmail()
Dim oOutlook As Object
Dim oMailItem As Object
Dim oRecipient As Object
Dim oNameSpace As Object

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True

Set oMailItem = oOutlook.CreateItem(0)
Set oRecipient = oMailItem.Recipients.Add(Range("D12").value)
oRecipient.Type = 1
oMailItem.Subject = "an email from me"
oMailItem.Body = "How are you"
oMailItem.Send

End Sub

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
There doesnt seem to be what i am looking for. it seems that everything on
the site will automatically send a sheet or a book. i only want to open
outlook to send my own email with my own subject etc. unless i am not

seeing
something.

nige

"Bob Phillips" wrote:

See http://ww.rondebruin.nl/sendmail.htm where this is covered.

--
HTH

Bob Phillips

"Nigel" wrote in message
...
Hi,
I have created a database for my company to use. I am looking for a

code
or
routine to help me on the following:
An email address is shown on the cell D12
I have written a code to change the cell contents from formula to

email.
I would like a button to copy the email address and open outlook to

create
an email to the specific address shown. I can do the rest but i am

really
stuck on this one.
If outlook is open, it may need an error handler to stop a second

instance
opening.

Summary:
i select my contact,
press a button,
outlook opens and the email address is in the "send to"

Regards,

Nigel






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
send email to each customer email in excel sheet. -keevill- Excel Discussion (Misc queries) 3 July 17th 08 02:33 PM
Email addresses in Excel need to format for mass email Boomer Excel Worksheet Functions 1 June 9th 06 01:46 PM
Email editor closes when forwarding Excel-embedded email Bambina Setting up and Configuration of Excel 0 March 16th 06 10:45 PM
working on excel document in email saved changes in email not in . butter Excel Discussion (Misc queries) 2 February 20th 06 09:25 AM
body of email disappears when I send an email from Excel ~A Excel Discussion (Misc queries) 0 February 25th 05 10:55 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"