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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the 'From' field on an Outlook Posting

Status
Not open for further replies.

deboyz

Programmer
Mar 22, 2002
11
0
0
CA

I am wondering if anyone knows how to change the 'From' field in an Outlook posting. The situation is this:

- Outlook postings are used to distribute corporate reports.
- Currently the postings are created manually by a user.
- I am automating the posting process and everything works fine except I haven't been able to figure out how to set the 'From' field. I want the posting to show that it is from my departments email address instead of from the person in my workgroup who runs the posting program.

Any help would be greatly appreciated!

Thank You!
 
deboyz,
have you looked at blat? do you have a server that you can put outlook on have have the profile be your dept's email?
hth
regards,
longhair
 
Thanks for the reply!

My workgroup has a shared PC that is setup with the department's email so as a last resort the distribution program will have to be run from that PC. I am trying to set it up so that the user can run the program from their own PC.
 
deboyz,
let them run the program from their machine, copy it to the shared pc with blat set up on it. you can then schedule blat to run from the task manager at a specific time or double click a batch job that you create.
another option is a neat little program called automate.
set this up on the shared pc. it can automatically email from the pc whenever a file shows up, or is changed. it really does automate a lot of common tasks.
hth
regards,
longhair
 
My situation is a little different. I have a program that writes the reports to the network. The reports are then reviewed and if everything looks good they are distributed. So the reports will not be routed as soon as they are created.

I have the interface built that the user goes into once they are ready to distribute a report. They just select the report distribution and click the run button to distribute the reports. A distribution can be made up of copying files, Outlook posts, and emails - the details of which are set when the reports are created for that distribution.

Thanks for the information though, I may be able to apply it to other processes.
 
myitem3.sentonbehalfofname = "Department E-mail"

The user who's computer is hosting the automation must have permission on the exchange server to actually send on behalf of the department mailbox.
 
Yes, all the permissions are in place. I just don't know how to change who the posting is 'From' in code. When I create a posting manually I can change the 'From' field to my departments email address and it posts fine but I don't know how to change the 'From' field of the posting in code. I looked in the Object Browser and I can't find any properties for the 'From' field that I can set which seems strange.
 
mintjulep gave you the answer, I guess.
Take a look at the SentOnBehalfOfName property of the MailItem object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I am using the sentonbehalfofname property for my email distribution but it is not available for an Outlook posting. I am using the PostItem object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top