A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Email merge with attachments from another user

Thread Tools Display Modes
Old June 3rd, 2010, 07:52 PM posted to microsoft.public.word.mailmerge.fields
external usenet poster
Posts: 99
Default 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?

Old June 4th, 2010, 12:30 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
Posts: 8,239
Default 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
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.