Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Ten Managbanag Ten Managbanag is offline
external usenet poster
 
Posts: 1
Default How to send mailmerge letters as attachment with private sensitivi

Hi All,

I trully hope you can help me. I have a problem of sending a mailmerge
letter as a private email.

I had set Outlook 2003 to send all emails from my account as "Private". When
I send a regular email it works. However, when using Word and sending a
mailmerge document it doesn't.

For some reason, eventhough Outlook had already been preset to send all
emails as Private, Mord overwrites the setting and reverts it back to Normal.

This happens whenever I was trying to send the document as an attachment. I
tried to send the same document as an HTML formal and it was able to retain
the preset sensitivity on Outlook and the messages were delivered as private.

Though that can be used as a work-around to the issue. I want to know if its
possible to send a mailmerged document as attachment and have it sent out as
a private email. If this is possible, how do I go about doing this?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to send mailmerge letters as attachment with private sensitivi

To understand what is going on, imagine that there is an e-mail
subsystem called MAPI on your computer that processes incoming and
outgoing messages. Any program can interact directly with MAPI to see
and organise emails. Outlook is just a program that is specifically
designed to to that. Some of the settings you make in Outlook may have
an effect on how the whole MAPI system behaves. Other settings only
affect the way Outlook builds or displays messages.

Actually, things are more complicated than that, but the fact is that
many of the settings you make in Outlook will not affect the emails you
send from Word MailMerge at all. (FWIW I do not know and could not telll
you exactly which Outlook settings affect mailmerges, but experience
suggests that it is not many of them)

However, since
a. Word sends emails to MAPI, which puts them in an Outbox
b. Outlook lets you control when emails are actually sent from the Outbox

What you can do is
c. before you start your merge, ensure your Outbox is empty
d. use Outlook options to prevent emails from being sent
e. do the merge
f. process the emails in the Outbox, either manually or
programmatically, e.g. using Outlook VBA. Typically you will have to
re-send them after changing them
g. use Outlook to switch on mail sending again.

At the moment I cannot check if (f) is simply a question of opening all
the MailItem items in the Outbox and doing something like setting
..Private to true, becauseI do not have Outlook to hand, but it's
probably the first thing I would look for. The Outlook people are more
likely to know the answer to that.

Peter Jamieson

http://tips.pjmsn.me.uk

Ten Managbanag wrote:
Hi All,

I trully hope you can help me. I have a problem of sending a mailmerge
letter as a private email.

I had set Outlook 2003 to send all emails from my account as "Private". When
I send a regular email it works. However, when using Word and sending a
mailmerge document it doesn't.

For some reason, eventhough Outlook had already been preset to send all
emails as Private, Mord overwrites the setting and reverts it back to Normal.

This happens whenever I was trying to send the document as an attachment. I
tried to send the same document as an HTML formal and it was able to retain
the preset sensitivity on Outlook and the messages were delivered as private.

Though that can be used as a work-around to the issue. I want to know if its
possible to send a mailmerged document as attachment and have it sent out as
a private email. If this is possible, how do I go about doing this?

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Ten Managbanag[_2_] Ten Managbanag[_2_] is offline
external usenet poster
 
Posts: 2
Default How to send mailmerge letters as attachment with private sensi

Hi Peter!

Thanks so much for the information. I tried out the steps you gave and it
worked! Its just a bit tedious though but at least it worked! Thanks so much!



"Peter Jamieson" wrote:

To understand what is going on, imagine that there is an e-mail
subsystem called MAPI on your computer that processes incoming and
outgoing messages. Any program can interact directly with MAPI to see
and organise emails. Outlook is just a program that is specifically
designed to to that. Some of the settings you make in Outlook may have
an effect on how the whole MAPI system behaves. Other settings only
affect the way Outlook builds or displays messages.

Actually, things are more complicated than that, but the fact is that
many of the settings you make in Outlook will not affect the emails you
send from Word MailMerge at all. (FWIW I do not know and could not telll
you exactly which Outlook settings affect mailmerges, but experience
suggests that it is not many of them)

However, since
a. Word sends emails to MAPI, which puts them in an Outbox
b. Outlook lets you control when emails are actually sent from the Outbox

What you can do is
c. before you start your merge, ensure your Outbox is empty
d. use Outlook options to prevent emails from being sent
e. do the merge
f. process the emails in the Outbox, either manually or
programmatically, e.g. using Outlook VBA. Typically you will have to
re-send them after changing them
g. use Outlook to switch on mail sending again.

At the moment I cannot check if (f) is simply a question of opening all
the MailItem items in the Outbox and doing something like setting
..Private to true, becauseI do not have Outlook to hand, but it's
probably the first thing I would look for. The Outlook people are more
likely to know the answer to that.

Peter Jamieson

http://tips.pjmsn.me.uk

Ten Managbanag wrote:
Hi All,

I trully hope you can help me. I have a problem of sending a mailmerge
letter as a private email.

I had set Outlook 2003 to send all emails from my account as "Private". When
I send a regular email it works. However, when using Word and sending a
mailmerge document it doesn't.

For some reason, eventhough Outlook had already been preset to send all
emails as Private, Mord overwrites the setting and reverts it back to Normal.

This happens whenever I was trying to send the document as an attachment. I
tried to send the same document as an HTML formal and it was able to retain
the preset sensitivity on Outlook and the messages were delivered as private.

Though that can be used as a work-around to the issue. I want to know if its
possible to send a mailmerged document as attachment and have it sent out as
a private email. If this is possible, how do I go about doing this?


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Ten Managbanag[_2_] Ten Managbanag[_2_] is offline
external usenet poster
 
Posts: 2
Default How to send mailmerge letters as attachment with private sensi


Hi Peter,

I tried the steps you gave and was able to make it work. However, I noticed
an error whenever I send it out like out instructed. I'll post the error here
later on.

Also, I noticed that I will create an email in the Outbox for each recipient
of the mailmerged document. This allows me to set each one as Private.
However, if the mailmerged document is intended to be sent to hundreds of
recipients, I will receive the error hundreds of times and will have to set
the private setting for each one as well.

Do you happen to know if there is a way to do this all in one go?
  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default How to send mailmerge letters as attachment with private sensi

However, I noticed
an error whenever I send it out like out instructed.


A problem I have had in the past is that if you open the Outbox and edit
messages in there, sometimes Outlook will not send them. But in that
situation, no error message was displayed so I assume you are seeing
something else.

Do you happen to know if there is a way to do this all in one go?


1. If you are marking he messages manually, you could try the following VBA
instead. It should work from both Outlook and Word, but in Word you will
need to ensure that there is a reference to the Microsoft Office xx.0
Outlook Library (with the VBA macro openin the VBE Editor, use
Tools|References to check the appropriate version of the library).

Sub MarkAllInOutboxAsPrivate()
Dim l As Long
Dim oa As Outlook.Application
Dim ns As Outlook.NameSpace
Dim fn As Outlook.Folder
Dim mm As Outlook.MailItem
Dim at As Outlook.Attachment
Set oa = GetObject(, "Outlook.Application")
Set ns = oa.GetNamespace("MAPI")
Set fn = ns.GetDefaultFolder(olFolderOutbox)
For Each mm In fn.Items
mm.Sensitivity = olPrivate
mm.Save
mm.Send
Next
Set fn = Nothing
Set ns = Nothing
Set oa = Nothing
End Sub

2. The difficulty with trying to automate the entire process is that
a. I do not think you can programmatically switch Outlook sending on and
off, at least not from Outlook. But you might want to check that in an
Outlook group. But that means that a one-step solution has to be able to set
each e-mail Private before it leaves the Outbox, and the only reliable way I
know to do that is to set it Private before you send it (i.e. put it in the
Outbox) in the first place. That means that you cannot use Word
merge-to-email because you do not get the opportunity to change any of the
properties of the message other than the title, body, address and format.
b. Using Word merge, the only other approach is to create the messages you
want to send first, then use the Outlook object model to send them. I
believe the following code has a chance of doing what Merge to email (HTML
format) does but
- it is pretty much untried, apart from a brief test here
- you may have problems with Outlook security
- the HTML used as the body text is generated by saving filtered HTML
from Word. That will probably only work for relatively simple HTML without
images etc..
- There may be a (low) limit on the maximum size of HTML you can use

Sub EmailOneHTMLPagePerSourceRecWithBody()
' By Peter Jamieson, 2006
' You need
' - a reference to the Microsoft Office xx.0 Outlook Library
' - a reference to the Microsoft Scripting Runtime

Dim bOutlookStarted As Boolean
Dim bTerminateMerge As Boolean
Dim intSourceRecord As Integer
Dim objMailItem As Outlook.MailItem
Dim objMerge As Word.MailMerge
Dim objOutlook As Outlook.Application
Dim strMailSubject As String
Dim strMailTo As String
Dim strMailBody As String
Dim strOutputDocumentName As String

bOutlookStarted = False
bTerminateMerge = False

' Set up a reference to the
' Activedocument, partly because
' the ActiveDocument changes as you
' merge each record

Set objMerge = ActiveDocument.MailMerge

' Start Outlook as necessary

On Error Resume Next
Set objOutlook = GetObject(, "Outlook.Application")
If Err 0 Then
Set objOutlook = CreateObject("Outlook.Application")
bOutlookStarted = True
End If

With objMerge

' If no data source has been defined,
' do it here using OpenDataSource.
' But if it is already defined in the
' document, you should not need to
' define it here.

' .OpenDataSource _
' Name:="whatever"

intSourceRecord = 1

Do Until bTerminateMerge
.DataSource.ActiveRecord = intSourceRecord

' if we have gone past the end
' (and possibly, if there are no records)
' then the Activerecord will not be what
' we have just tried to set it to

If .DataSource.ActiveRecord intSourceRecord Then
bTerminateMerge = True
' the record exists
Else
' while we are looking at the
' correct activerecord,
' create the mail subject, body and "to"
' Just some sample code here - replace it with
' whatever you need
' NB, the field names here must match the field names Word sees
/exactly/
' case is significant, i.e.
' If your data source uses "firstname", use "firstname". If it uses
"Firstname", use "Firstname"
' In some cases Word may modify the names (e.g. if they contain spaces)
strMailSubject = _
"Results for " & _
objMerge.DataSource.DataFields("Firstname") & _
" " & objMerge.DataSource.DataFields("Lastname")

' Use a simple sample
' we will create the body dynamically later
' strMailBody = "HTMLBODYTABLE
BORDER=5TRTDk/TDTDt/TD/TR/TABLE/BODY/HTML"
' substitute your email address field name
strMailTo = objMerge.DataSource.DataFields("Emailaddress")

' create the document path name
' In this case it can be the same for every recipient,
' but if you want to retain copies of the
' document, you can use info. in the data source

' this is an example - insert your
' own pathname here

strOutputDocumentName = "c:\a\results.htm"

' strOutputDocumentName = _
' "c:\mymergeletters\_" & _
' .DataSource.DataFields("Lastname").Value & _
' " letter.doc"
.DataSource.FirstRecord = intSourceRecord
.DataSource.LastRecord = intSourceRecord
.Destination = wdSendToNewDocument
.Execute

' The Activedocument is always the
' output document

' Add any parameters you need to these calls
ActiveDocument.SaveAs strOutputDocumentName, wdFormatFilteredHTML
ActiveDocument.Close

' Now create a mail item

Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.BodyFormat = olFormatHTML
.Subject = strMailSubject
' use the dynamic body
.HTMLBody = getText(strOutputDocumentName)
' use a more static body
.HTMLBody = strMailBody
.To = strMailTo
' send the merged doc. as an attachment
'.Attachments.Add strOutputDocumentName, olByValue, 1
.Save
.Send
End With
Set objMailItem = Nothing

intSourceRecord = intSourceRecord + 1
End If
Loop
End With

' Close Outlook if appropriate

If bOutlookStarted Then
objOutlook.Quit
End If

Set objOutlook = Nothing
Set objMerge = Nothing

End Sub

Function getText(strPath As String)
' Return an entire HTML file (we don't check the format) as a string
On Error Resume Next
Dim objFSO As Scripting.FileSystemObject
Dim objTextStream As Scripting.TextStream
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FileExists(strPath) Then
getText = ""
Exit Function
End If
Set objTextStream = objFSO.OpenTextFile(strPath, Scripting.ForReading)
If objTextStream.AtEndOfStream Then
' I leave you to cope with these errors sensibly
MsgBox "Message body " & strPath & " is empty."
getText = ""
Exit Function
End If
getText = objTextStream.ReadAll
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
End Function



--
Peter Jamieson
http://tips.pjmsn.me.uk

"Ten Managbanag" wrote in message
...

Hi Peter,

I tried the steps you gave and was able to make it work. However, I
noticed
an error whenever I send it out like out instructed. I'll post the error
here
later on.

Also, I noticed that I will create an email in the Outbox for each
recipient
of the mailmerged document. This allows me to set each one as Private.
However, if the mailmerged document is intended to be sent to hundreds of
recipients, I will receive the error hundreds of times and will have to
set
the private setting for each one as well.

Do you happen to know if there is a way to do this all in one go?




  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Maniac[_2_] Maniac[_2_] is offline
external usenet poster
 
Posts: 3
Default send word as attachment in mail merge with text in body

I had search through many way and google too. I cannot find any article that related with.

I have to sent a survey to many different customer, but i want the survey form attach to the mail and it have the detail of the customer like Name and Company Name so that every time customer feedback the mail i just download the attachment and print it out.

I know how to mail merge in word 2003 or 2007 (i'm using office 2007) and i can sent the file as attachment, but the
body text is actually empty !!! if sent file as attachment.

How to include some message inside the email body so that customer can have some instruction to answer the survey



Ten Managbana wrote:

How to send mailmerge letters as attachment with private sensitivi
15-Nov-08

Hi All,

I trully hope you can help me. I have a problem of sending a mailmerge
letter as a private email.

I had set Outlook 2003 to send all emails from my account as "Private". When
I send a regular email it works. However, when using Word and sending a
mailmerge document it doesn't.

For some reason, eventhough Outlook had already been preset to send all
emails as Private, Mord overwrites the setting and reverts it back to Normal.

This happens whenever I was trying to send the document as an attachment. I
tried to send the same document as an HTML formal and it was able to retain
the preset sensitivity on Outlook and the messages were delivered as private.

Though that can be used as a work-around to the issue. I want to know if its
possible to send a mailmerged document as attachment and have it sent out as
a private email. If this is possible, how do I go about doing this?

Previous Posts In This Thread:

On Saturday, November 15, 2008 4:56 PM
Ten Managbana wrote:

How to send mailmerge letters as attachment with private sensitivi
Hi All,

I trully hope you can help me. I have a problem of sending a mailmerge
letter as a private email.

I had set Outlook 2003 to send all emails from my account as "Private". When
I send a regular email it works. However, when using Word and sending a
mailmerge document it doesn't.

For some reason, eventhough Outlook had already been preset to send all
emails as Private, Mord overwrites the setting and reverts it back to Normal.

This happens whenever I was trying to send the document as an attachment. I
tried to send the same document as an HTML formal and it was able to retain
the preset sensitivity on Outlook and the messages were delivered as private.

Though that can be used as a work-around to the issue. I want to know if its
possible to send a mailmerged document as attachment and have it sent out as
a private email. If this is possible, how do I go about doing this?

On Sunday, November 16, 2008 4:33 AM
Peter Jamieson wrote:

To understand what is going on, imagine that there is an e-mail subsystem
To understand what is going on, imagine that there is an e-mail
subsystem called MAPI on your computer that processes incoming and
outgoing messages. Any program can interact directly with MAPI to see
and organise emails. Outlook is just a program that is specifically
designed to to that. Some of the settings you make in Outlook may have
an effect on how the whole MAPI system behaves. Other settings only
affect the way Outlook builds or displays messages.

Actually, things are more complicated than that, but the fact is that
many of the settings you make in Outlook will not affect the emails you
send from Word MailMerge at all. (FWIW I do not know and could not telll
you exactly which Outlook settings affect mailmerges, but experience
suggests that it is not many of them)

However, since
a. Word sends emails to MAPI, which puts them in an Outbox
b. Outlook lets you control when emails are actually sent from the Outbox

What you can do is
c. before you start your merge, ensure your Outbox is empty
d. use Outlook options to prevent emails from being sent
e. do the merge
f. process the emails in the Outbox, either manually or
programmatically, e.g. using Outlook VBA. Typically you will have to
re-send them after changing them
g. use Outlook to switch on mail sending again.

At the moment I cannot check if (f) is simply a question of opening all
the MailItem items in the Outbox and doing something like setting
..Private to true, becauseI do not have Outlook to hand, but it's
probably the first thing I would look for. The Outlook people are more
likely to know the answer to that.

Peter Jamieson

http://tips.pjmsn.me.uk

Ten Managbanag wrote:

On Sunday, November 16, 2008 10:03 AM
TenManagbana wrote:

Hi Peter!
Hi Peter!

Thanks so much for the information. I tried out the steps you gave and it
worked! Its just a bit tedious though but at least it worked! Thanks so much!



"Peter Jamieson" wrote:

On Monday, November 17, 2008 10:05 AM
TenManagbana wrote:

Hi Peter,I tried the steps you gave and was able to make it work.
Hi Peter,

I tried the steps you gave and was able to make it work. However, I noticed
an error whenever I send it out like out instructed. I'll post the error here
later on.

Also, I noticed that I will create an email in the Outbox for each recipient
of the mailmerged document. This allows me to set each one as Private.
However, if the mailmerged document is intended to be sent to hundreds of
recipients, I will receive the error hundreds of times and will have to set
the private setting for each one as well.

Do you happen to know if there is a way to do this all in one go?

On Monday, November 17, 2008 1:03 PM
Peter Jamieson wrote:

A problem I have had in the past is that if you open the Outbox and edit
A problem I have had in the past is that if you open the Outbox and edit
messages in there, sometimes Outlook will not send them. But in that
situation, no error message was displayed so I assume you are seeing
something else.


1. If you are marking he messages manually, you could try the following VBA
instead. It should work from both Outlook and Word, but in Word you will
need to ensure that there is a reference to the Microsoft Office xx.0
Outlook Library (with the VBA macro openin the VBE Editor, use
Tools|References to check the appropriate version of the library).

Sub MarkAllInOutboxAsPrivate()
Dim l As Long
Dim oa As Outlook.Application
Dim ns As Outlook.NameSpace
Dim fn As Outlook.Folder
Dim mm As Outlook.MailItem
Dim at As Outlook.Attachment
Set oa = GetObject(, "Outlook.Application")
Set ns = oa.GetNamespace("MAPI")
Set fn = ns.GetDefaultFolder(olFolderOutbox)
For Each mm In fn.Items
mm.Sensitivity = olPrivate
mm.Save
mm.Send
Next
Set fn = Nothing
Set ns = Nothing
Set oa = Nothing
End Sub

2. The difficulty with trying to automate the entire process is that
a. I do not think you can programmatically switch Outlook sending on and
off, at least not from Outlook. But you might want to check that in an
Outlook group. But that means that a one-step solution has to be able to set
each e-mail Private before it leaves the Outbox, and the only reliable way I
know to do that is to set it Private before you send it (i.e. put it in the
Outbox) in the first place. That means that you cannot use Word
merge-to-email because you do not get the opportunity to change any of the
properties of the message other than the title, body, address and format.
b. Using Word merge, the only other approach is to create the messages you
want to send first, then use the Outlook object model to send them. I
believe the following code has a chance of doing what Merge to email (HTML
format) does but
- it is pretty much untried, apart from a brief test here
- you may have problems with Outlook security
- the HTML used as the body text is generated by saving filtered HTML
from Word. That will probably only work for relatively simple HTML without
images etc..
- There may be a (low) limit on the maximum size of HTML you can use

Sub EmailOneHTMLPagePerSourceRecWithBody()
' By Peter Jamieson, 2006
' You need
' - a reference to the Microsoft Office xx.0 Outlook Library
' - a reference to the Microsoft Scripting Runtime

Dim bOutlookStarted As Boolean
Dim bTerminateMerge As Boolean
Dim intSourceRecord As Integer
Dim objMailItem As Outlook.MailItem
Dim objMerge As Word.MailMerge
Dim objOutlook As Outlook.Application
Dim strMailSubject As String
Dim strMailTo As String
Dim strMailBody As String
Dim strOutputDocumentName As String

bOutlookStarted = False
bTerminateMerge = False

' Set up a reference to the
' Activedocument, partly because
' the ActiveDocument changes as you
' merge each record

Set objMerge = ActiveDocument.MailMerge

' Start Outlook as necessary

On Error Resume Next
Set objOutlook = GetObject(, "Outlook.Application")
If Err 0 Then
Set objOutlook = CreateObject("Outlook.Application")
bOutlookStarted = True
End If

With objMerge

' If no data source has been defined,
' do it here using OpenDataSource.
' But if it is already defined in the
' document, you should not need to
' define it here.

' .OpenDataSource _
' Name:="whatever"

intSourceRecord = 1

Do Until bTerminateMerge
.DataSource.ActiveRecord = intSourceRecord

' if we have gone past the end
' (and possibly, if there are no records)
' then the Activerecord will not be what
' we have just tried to set it to

If .DataSource.ActiveRecord intSourceRecord Then
bTerminateMerge = True
' the record exists
Else
' while we are looking at the
' correct activerecord,
' create the mail subject, body and "to"
' Just some sample code here - replace it with
' whatever you need
' NB, the field names here must match the field names Word sees
/exactly/
' case is significant, i.e.
' If your data source uses "firstname", use "firstname". If it uses
"Firstname", use "Firstname"
' In some cases Word may modify the names (e.g. if they contain spaces)
strMailSubject = _
"Results for " & _
objMerge.DataSource.DataFields("Firstname") & _
" " & objMerge.DataSource.DataFields("Lastname")

' Use a simple sample
' we will create the body dynamically later
' strMailBody = "HTMLBODYTABLE
BORDER=5TRTDk/TDTDt/TD/TR/TABLE/BODY/HTML"
' substitute your email address field name
strMailTo = objMerge.DataSource.DataFields("Emailaddress")

' create the document path name
' In this case it can be the same for every recipient,
' but if you want to retain copies of the
' document, you can use info. in the data source

' this is an example - insert your
' own pathname here

strOutputDocumentName = "c:\a\results.htm"

' strOutputDocumentName = _
' "c:\mymergeletters\_" & _
' .DataSource.DataFields("Lastname").Value & _
' " letter.doc"
.DataSource.FirstRecord = intSourceRecord
.DataSource.LastRecord = intSourceRecord
.Destination = wdSendToNewDocument
.Execute

' The Activedocument is always the
' output document

' Add any parameters you need to these calls
ActiveDocument.SaveAs strOutputDocumentName, wdFormatFilteredHTML
ActiveDocument.Close

' Now create a mail item

Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.BodyFormat = olFormatHTML
.Subject = strMailSubject
' use the dynamic body
.HTMLBody = getText(strOutputDocumentName)
' use a more static body
.HTMLBody = strMailBody
.To = strMailTo
' send the merged doc. as an attachment
'.Attachments.Add strOutputDocumentName, olByValue, 1
.Save
.Send
End With
Set objMailItem = Nothing

intSourceRecord = intSourceRecord + 1
End If
Loop
End With

' Close Outlook if appropriate

If bOutlookStarted Then
objOutlook.Quit
End If

Set objOutlook = Nothing
Set objMerge = Nothing

End Sub

Function getText(strPath As String)
' Return an entire HTML file (we don't check the format) as a string
On Error Resume Next
Dim objFSO As Scripting.FileSystemObject
Dim objTextStream As Scripting.TextStream
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FileExists(strPath) Then
getText = ""
Exit Function
End If
Set objTextStream = objFSO.OpenTextFile(strPath, Scripting.ForReading)
If objTextStream.AtEndOfStream Then
' I leave you to cope with these errors sensibly
MsgBox "Message body " & strPath & " is empty."
getText = ""
Exit Function
End If
getText = objTextStream.ReadAll
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
End Function



--
Peter Jamieson
http://tips.pjmsn.me.uk

"Ten Managbanag" wrote in message
...


Submitted via EggHeadCafe - Software Developer Portal of Choice
XAML Organizer
http://www.eggheadcafe.com/tutorials...organizer.aspx
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default send word as attachment in mail merge with text in body

See the article "Mail Merge to E-mail with Attachments" at
http://word.mvps.org/FAQs/MailMerge/...ttachments.htm


--
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, originally posted via msnews.microsoft.com

"Maniac" wrote in message ...
I had search through many way and google too. I cannot find any article
that related with.

I have to sent a survey to many different customer, but i want the survey
form attach to the mail and it have the detail of the customer like Name
and Company Name so that every time customer feedback the mail i just
download the attachment and print it out.

I know how to mail merge in word 2003 or 2007 (i'm using office 2007) and
i can sent the file as attachment, but the
body text is actually empty !!! if sent file as attachment.

How to include some message inside the email body so that customer can
have some instruction to answer the survey





  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Maniac[_2_] Maniac[_2_] is offline
external usenet poster
 
Posts: 3
Default Article on "Mail Merge to E-mail with Attachments" athttp://word.mvps.

Thanks Robbins, i had read on the article but i'm not really understand your article well tough i not familiar with word 2007. Hope you can guide me through this step by step.

1. I had create my own doc and ready to email. I don't know how to setup a "Catalog"? Is this setup in word or outlook?

2. I using excel as my data source for mail merge. I already have the attachment file path in one of the column in that data source.

3. How do i load the attachment so that during merge mail it will load the path?

4. I really can't figure out how to do this unless there is a step by step guide to do this.

Thanks



Doug Robbins - Word MVP wrote:

See the article "Mail Merge to E-mail with Attachments" athttp://word.mvps.
24-May-10

See the article "Mail Merge to E-mail with Attachments" at
http://word.mvps.org/FAQs/MailMerge/...ttachments.htm


--
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, originally posted via msnews.microsoft.com

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Customized Find Control for FlowDocuments
http://www.eggheadcafe.com/tutorials...ind-contr.aspx
  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Article on "Mail Merge to E-mail with Attachments" athttp://word.mvps.

In later versions of Word, the catalog type mail merge main document was
renamed to Directory. You create that in Word by selecting Directory form
the Start Mail Merge pulldown in the Start Mail Merge section of the
Mailings tab of the ribbon.

The article to which I referred you is a step by step guide to the process.
You must however follow it exactly or the process will not work as intended.

--
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, originally posted via msnews.microsoft.com

"Maniac" wrote in message ...
Thanks Robbins, i had read on the article but i'm not really understand
your article well tough i not familiar with word 2007. Hope you can guide
me through this step by step.

1. I had create my own doc and ready to email. I don't know how to setup a
"Catalog"? Is this setup in word or outlook?

2. I using excel as my data source for mail merge. I already have the
attachment file path in one of the column in that data source.

3. How do i load the attachment so that during merge mail it will load the
path?

4. I really can't figure out how to do this unless there is a step by step
guide to do this.

Thanks



Doug Robbins - Word MVP wrote:

See the article "Mail Merge to E-mail with Attachments"
athttp://word.mvps.
24-May-10

See the article "Mail Merge to E-mail with Attachments" at
http://word.mvps.org/FAQs/MailMerge/...ttachments.htm


--
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, originally posted via msnews.microsoft.com

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Customized Find Control for FlowDocuments
http://www.eggheadcafe.com/tutorials...ind-contr.aspx


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge with attachment - body only visible in first e-mail send Cees Mailmerge 3 October 24th 08 02:19 PM
Send as attachment doesn't send e-mail Kim K Microsoft Word Help 1 January 31st 08 08:05 AM
send to mail recipient ( as Attachment) the email will not send. [email protected] Microsoft Word Help 4 May 30th 07 02:11 PM
How do I send an Attachment, using Vista Oyama Microsoft Word Help 1 March 21st 07 10:59 PM
cannot Send To as attachment eyefull Microsoft Word Help 0 April 3rd 05 02:35 AM


All times are GMT +1. The time now is 10:57 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"