ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Accessing Outlooks address book via VBA embedded in Excel (https://www.excelbanter.com/excel-programming/405241-accessing-outlooks-address-book-via-vba-embedded-excel.html)

Phil Martin

Accessing Outlooks address book via VBA embedded in Excel
 
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?

Ron de Bruin

Accessing Outlooks address book via VBA embedded in Excel
 
Hi Phil

Display the mail and let the user choose

Do you use SendMail in the code or the Outlook object model


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?


JP[_4_]

Accessing Outlooks address book via VBA embedded in Excel
 
Sorry, I can't seem to view the original message.

You can do this in CDO, see he http://www.outlookcode.com/d/code/selectnames.htm

Also there is a method in Outlook 2007, if you have it:
http://msdn2.microsoft.com/en-us/library/bb208172.aspx

HTH,
JP

On Jan 29, 12:08*pm, "Ron de Bruin" wrote:
Hi Phil

Display the mail and let the user choose

Do you use SendMail *in the code or the Outlook object model

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"Phil Martin" wrote in ...
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?- Hide quoted text -


- Show quoted text -



Phil Martin

Accessing Outlooks address book via VBA embedded in Excel
 
Hi Ron,

The sendmail is in the code. At the moment the user does not see the mail.
It acts like it is a background process

"Ron de Bruin" wrote:

Hi Phil

Display the mail and let the user choose

Do you use SendMail in the code or the Outlook object model


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?



Ron de Bruin

Accessing Outlooks address book via VBA embedded in Excel
 
Hi Phil

Then use

.SendMail "", _
"This is the Subject line"

If the To is "" empty it will display the mail and the user can use the address book


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
Hi Ron,

The sendmail is in the code. At the moment the user does not see the mail.
It acts like it is a background process

"Ron de Bruin" wrote:

Hi Phil

Display the mail and let the user choose

Do you use SendMail in the code or the Outlook object model


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?



Phil Martin

Accessing Outlooks address book via VBA embedded in Excel
 
Hi Ron,

Works perfectly, thanks very much

"Ron de Bruin" wrote:

Hi Phil

Then use

.SendMail "", _
"This is the Subject line"

If the To is "" empty it will display the mail and the user can use the address book


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
Hi Ron,

The sendmail is in the code. At the moment the user does not see the mail.
It acts like it is a background process

"Ron de Bruin" wrote:

Hi Phil

Display the mail and let the user choose

Do you use SendMail in the code or the Outlook object model


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Phil Martin" wrote in message ...
I have a spreadsheet that mails itself to an end user upon completion. The
recipient is specified by the user. At the moment this is by using inputbox.
What I would like to do is bring up the Outlook address book and let the user
select the email address from that. Is that possible?




All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com