LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DS DS is offline
external usenet poster
 
Posts: 117
Default Changing the "From" field in Outlook using Excel macro

Afternoon all, here's hoping that someone might know off hand something
that's perplexing me.

I'm running some code that creates e-mails and sends (no attachment). I'm
using the SendKeys method to bypass the Outlook security warning, as
3rd-party apps aren't suitable, and using CDO isn't an option due to needing
to keep a copy in "Sent".

However, just to mix it up, I need to be able to amend the "From" field in
the Mail to be sent.

Currently it generates and sends ok using:

With OutMail
.To = addressees
.CC = ""
.BCC = ""
.Subject = "Password to Access File to Follow"
.Body = strbody
.Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%S"
End With

Adding a line stating ".From = unusualaddress" doesn't amend the From field
in the message, sending instead with the default sender options for the
Outlook account - ie my personal one rather than a specific other address
(which I can send from normall).

Had a look through RDB's site where I would normally go for this kind of
thing, but couldn't find anything about amending the From field.

Anyone got any ideas to save what's left of my hair?

TIA
 
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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 16th 08 09:23 PM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 15th 08 07:26 PM
Excel: Changing "numeric $" to "text $" in a different cell. Heather_CCF Excel Worksheet Functions 1 September 5th 06 06:06 PM
"Clean Me" Macro is giving "#VALUE!" error in the Notes field. Ryan Watkins Excel Programming 1 June 11th 05 12:25 AM


All times are GMT +1. The time now is 08:13 AM.

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

About Us

"It's about Microsoft Excel"