My Assistant
![]() ![]() |
|
|
Sep 27 2011, 03:55 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 287 |
I am using Excel VBA outmail to automate sending many emails at once. Though, I want to send them from a specific managed Outlook 2007 mailbox that I have read/write access to.
Is there an equivalent .From command so that I can choose from which mailbox the item is sent? Or, is there a way to change my default mailbox in Outlook (manually or VBA) so that it is sent from that mailbox? CODE With OutMail
.From = strfrm .To = strto .CC = strcc .BCC = strbcc .Subject = "subject" .Body = strbody .Attachments.Add "attached file" '.Send 'or use .Display |
|
|
|
Sep 27 2011, 03:57 PM
Post
#2
|
|
|
UtterAccess Certified! Posts: 7,205 From: Arizona, United States |
I have had this question before too, and honestly don't remember what the answer was. I believe it may have to do with what method you are using to declare the Outlook variable and all that.
But here is a simpler , non-vba solution: Create an outlook profile as the mailbox itself. (so that you can open Outlook "as" the mailbox itself, not as yourself). Then, once you've opened Outlook using that profile, run your same VBA. It will default from the only thing it can do.....the outlook profile you have open. |
|
|
|
Sep 27 2011, 04:13 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 287 |
Thanks ipisors.
Can you send me info on creating the outlook profile, so that my desired mailbox is the default? I tried a couple, like this one to no avail: http://www.howto-outlook.com/faq/newprofile.htm Also, how will I open Outlook using that email profile? This post has been edited by lrb190: Sep 27 2011, 04:15 PM |
|
|
|
Sep 27 2011, 04:19 PM
Post
#4
|
|
|
UtterAccess Certified! Posts: 7,205 From: Arizona, United States |
I don't know much about the 'IT' department behind MS exchange, but, this is what I do to create an outlook profile. it works on any mailbox that I have access to, even if IT hasn't given me specific access to send 'as' or send 'from' the mailbox (while logged in under my personal profile, anyway).
after you've already added the mailbox to your Outlook list of folders, right click on it. go to properties. Advanced, General, you will see a "microsoft exchange server" there. put it on your clipboard, you are about to close outlook. close outlook. go to start, control panel, mail, profiles, add a profile. add a profile and name it anythign you want. once it's populated in the list of profiles, then go to Properties, then Email accounts, select the one account that's there (defaults to your personal account--you don't want that), and click Change, then paste in the server name you have on your clipboard (very often, but not always, the same one already there), then in the username, type the name of the mailbox exactly as it appears in the global address list. Not the smtp necesarily. Example, it might be called File Requests. click Check Name - if you can get past this point you are golden. then finish/exit, etc., to finish the process. back on the Profiles listing, be sure that "prompt for a profile to be used" is checked, unless you think about it and don't want this to happen. Next time you open outlook, it will prompt you for a profile to be used. select the one you created. |
|
|
|
Oct 5 2011, 10:39 AM
Post
#5
|
|
|
UtterAccess Addict Posts: 287 |
ipisors,
I owe you a great deal of thanks because your solution works perfectly! I was very happy that your solution was permitted by the IT department. Thank you so much for taking the time to help me by writing out such a detailed answer, our automated emails are a success and will be for a long time. |
|
|
|
Oct 5 2011, 12:06 PM
Post
#6
|
|
|
UtterAccess Certified! Posts: 7,205 From: Arizona, United States |
I'm glad it worked out for you!
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 03:11 PM |