Hi I have the code below from
(http://word.mvps.org/FAQs/InterDev/SendMail.htm)
It works great, but I don't want the recipient to know the email address of
the sender (and thus be able to reply to the mail).
Is it possible to amend the code to put a dummy email address of for
replying (ie a@b.c)
Thanks
Sub SendDocumentAsAttachment()
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
If Len(ActiveDocument.Path) = 0 Then
MsgBox "Document needs to be saved first"
Exit Sub
End If
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.To = TextBox1.Value
.Subject = TextBox2.Value
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue, _
DisplayName:="Document as attachment"
.Body = "This mail has been sent from an unmanned email account,
please do not reply"
.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
red6000 - 29 Mar 2007 18:31 GMT
Okay,
I've added:
.ReplyRecipients.Add ("The email address that this mail came from is an
un-manned mailbox and will be automatically deleted@donotrply.com")
and this does change the reply address, but the senders address is still
visible in the recieved email.
I've tried .senderemailadress, but this is a read only property.
Is it possible to hide the senders address?
Thanks.
> Hi I have the code below from
> (http://word.mvps.org/FAQs/InterDev/SendMail.htm)
[quoted text clipped - 46 lines]
>
> End Sub
Doug Robbins - Word MVP - 29 Mar 2007 19:52 GMT
If I were to receive an email of the type that you are trying to send, it
would get delete immediately.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Okay,
>
[quoted text clipped - 62 lines]
>>
>> End Sub
red6000 - 29 Mar 2007 22:28 GMT
Thanks for the help?
The email is going to companies that we have contracts with so they will
recognise and trust the domain. What we want is any incoming mail to go to
a central mailbox and not have our partners replying to the individuals
mailbox that the mail came from.
Clearly the text below is not what i will really say in the mails, but I'm
not going to put the genuine mail address in the example code here as I'll
just end up getting spammed.
If you google my posts over the past few months, hopefully it is clear that
I'm not trying to come up with a spamming scam.
Is there a way to choose which account in Outlook the mail is sent from so
that I can choose the central mailbox account or use the code below and hide
the individuals mail address?
> If I were to receive an email of the type that you are trying to send, it
> would get delete immediately.
[quoted text clipped - 65 lines]
>>>
>>> End Sub
red6000 - 29 Mar 2007 23:32 GMT
Ahh,
I need the sentnbehalfofname property and set up the central mailbox as a
contact.
> Thanks for the help?
>
[quoted text clipped - 83 lines]
>>>>
>>>> End Sub