If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Email merge with attachments from another user
I've been using the code I found on this site to e-mail merge with
attachments and I love it! Recently a new problem came up. I need to send out invoices attached to e-mails (easy using the code), but "from" my boss, Betsy. In Outlook, you can go to Option and "show from" but I can't figure out how to make the macro code do that. Any suggestions? Thanks! |
#2
|
|||
|
|||
Email merge with attachments from another user
In the
With oItem .Subject = mysubject .Body = Source.Sections(j).Range.Text Set Datarange = Maillist.Tables(1).Cell(j, 1).Range Datarange.End = Datarange.End - 1 .To = Datarange For i = 2 To Maillist.Tables(1).Columns.Count Set Datarange = Maillist.Tables(1).Cell(j, i).Range Datarange.End = Datarange.End - 1 .Attachments.Add Trim(Datarange.Text), olByValue, 1 Next i .Send End With section of the code, you can add the appropriate one of the following (before the .Send command) .Sender = "SenderName" 'If using 2010. Returns or sets an AddressEntry object that corresponds to the user of the account from which the MailItem is sent. .SendUsingAccount = "Sender Account" 'If using 2007. Returns or sets an Account object that represents the account under which the MailItem is to be sent. .SentOnBehalfOfName = "Name of Person" 'Returns a String indicating the display name for the intended sender of the mail message. |
Thread Tools | |
Display Modes | |
|
|