Selection of Send-From Account with Template VBA Shortcut

Status
Not open for further replies.

discgolfdc

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
Hi, all! I'd have to imagine that this should be a fairly easy question for those who know anything more than I do (which isn't saying a whole lot).


I am trying to get some shortcut buttons in a custom Outlook ribbon tab/group that I've created, and I understand how to do that as well as assign macros to those new buttons I'll be putting there. I am using the following macro to call up an OFT template to prepare it for sending:


Code:
Sub OpenCustomTemplate()
  Set newItem = Application.CreateItemFromTemplate("C:\Users\Me\AppData\Roaming\Microsoft\Templates\Initial Instructor Paperwork Send.oft")
  newItem.Display
End Sub



My problem is this: I have two exchange accounts on our server - one in my name (myname@institution.com), and the other in the name of a specific department I coordinate (departmentname@institution.com). The departmental account was recently tied to my profile, so the "default" account is the one under my name. Is there anything I can add to that code so as to force the newItem to default to being sent from departmentname rather than from myname? When I call up the template using the above code, it always defaults to sending from myname. I know I can always hit the "From" button in the template once it's called up, but if I can automate it, it would be better for me.


Any ideas?


Thanks!
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
G Default Address Book and selection of address books to send email Using Outlook 1
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
Y Outlook Task View - Table Format - Customize Reminder Time to Drop-Down Selection Using Outlook 2
J Force account selection for sending reply emails Using Outlook 1
L Navigation Pane selection with shortcuts Using Outlook 2
C Force account selection - no reg path nor can create one Using Outlook 9
W Outlook: Uniquely identifying attachments in selection Using Outlook 0
P Field option selection resulting into multiple questions BCM (Business Contact Manager) 0
K Default Account and Signature Selection Using Outlook 5
Y Changing colour of selection bar in Outlook (too light, needs to be grey) Using Outlook 4
P Outlook contact form no longer requiring Category selection to add new Using Outlook 1
I How can you print a selection of an email from MS Outlook 2010? Using Outlook 2
T Distribution Lists, Selecting members, filtering members out of the selection process (not one by one) Using Outlook 2
L No Options Selection in File Menu in Outlook Mail 2007 Using Outlook 1
N Changing the 'Mark item as read when selection changes' at runtime Outlook VBA and Custom Forms 1
P How to improve the email item selection event performance? Outlook VBA and Custom Forms 1
K How do I eliminate the "Enable Macro" selection? Outlook VBA and Custom Forms 16
C Eliminate need for "Enable Macro" selection Outlook VBA and Custom Forms 7
X Re: how to access current text selection Outlook VBA and Custom Forms 1
S Automating the selection of email accounts upon adding email addre Outlook VBA and Custom Forms 1
A Unflag Inbox and Flag Inbox with Orange Category After Item is send Outlook VBA and Custom Forms 3
glnz O365 - How to send from acct 2 but showing email name from acct 1 as From - alias? Using Outlook 1
S Outlook Macro to send auto acknowledge mail only to new mails received to a specific shared inbox Outlook VBA and Custom Forms 0
diver864 vba for a rule to automatically accept meeting requests with 'vacation' in subject, change to all-day event, change to free, don't send reply Outlook VBA and Custom Forms 1
PGSystemTester VBA To Change AppointmentItem.BusyStatus From MeetingItem Before Send Using Outlook 0
C Synchronizing subscribed folders causes hanging during send/receive process Using Outlook 2
M Extract all links from Outlook email, send to Excel Using Outlook 2
A VBA macro for 15 second loop in send and received just for 1 specific mailbox Outlook VBA and Custom Forms 1
O Outlook 365 - suddenly unable to send using Gmail POP3 Using Outlook 10
T After I send a new email, it remains in the Draft folder Using Outlook.com accounts in Outlook 3
B Programmatically force html send and insert clipboard contents into body Outlook VBA and Custom Forms 0
S Change VBA script to send HTML email instead of text Outlook VBA and Custom Forms 3
M ERROR: None of your email accounts could send to this recipient Using Outlook 2
C Send/receive error 80040119 Using Outlook 2
J Send Again NDR Outlook VBA and Custom Forms 1
J Add an Attachment Using an Array and Match first 17 Letters to Matching Template .oft to Send eMail Outlook VBA and Custom Forms 2
ChrisK2 Send email to advertise@slipstick.com fails: "The group advertising isn't set up to receive messages from..." Using Outlook 3
B resend if no reply and send an automatic reminder Outlook VBA and Custom Forms 0
F Send As a Gmail account via outlook Web Using Outlook 3
R auto send email when meeting closes from a shared calendar only Outlook VBA and Custom Forms 2
X Unable to send an email from one account to another on same PC Using Outlook 2
S Meeting Invite arrives from Wrong ("send-as") Sender Using Outlook 1
M VBA to send reminder email if no response Using Outlook 13
D Using a VBA Custom Form to Send Reoccurring Email Upon Task Completion Outlook VBA and Custom Forms 4
M Can't send email in outlook.com Using Outlook 9
R Can't Send calendar share invite Using Outlook 5
R Can't send messages to groups in Outlook Using Outlook 2
J Updating existing entry on shared calendar wants to send update from delegate Using Outlook 0
M Send/Receive error 0x800CCC0F Using Outlook 0
soadfan Outlook won't send e-mail when offline Outlook VBA and Custom Forms 19

Similar threads

Top