Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel XP Conditional Send Mail

Status
Not open for further replies.

Adnane

Technical User
Apr 22, 2003
88
EU
Hi,
i need to send a word document from an excel file based on a flag.

an extract of the xl file would be:

Customer Doc Mail_address Send

Customer1 My_Doc address1@server.com yes
Customer2 My_Doc1 address2@server.com No

what i would like to end up with is to send my_doc to only Customer1 since it has the flag "yes" and then replace the flag by "Sent"

Thanks
 
First, you can change the Yes and No to Sent or not sent and use Y ONLY when it has been sent.

Then, you can use a mailmerge to send the file/message.

In the criteria of a mail merge query, you can put where field "Sent" is blank.

You'll have to then manually update the Excel file, but you can easily select the cells where the Yes would appear, and hit Edit-Go to-Special-Blanks, Ok. Once selected, type Y or Yes and hit Ctrl+Enter (or is that shift+enter?).

To automate it would take quite a bit of coding...

Anne Troy
Word and Excel Macros
Coming soon: wX
 
Thanks Anne. The mail merge is a good solution but actually it has be something 100% automated. so that the user just runs the macro and that's it.

Adnane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top