Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2006

Tip: Looking for answers? Try searching our database.

Saved Mailmerge Document Emailed to Outsider

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WordHazIt - 21 Jul 2006 15:43 GMT
How do I suppress the Reconnect to database when a document created with
mailmerge is sent outside the company?
Peter Jamieson - 21 Jul 2006 17:16 GMT
If you want to e-mail the /result/ of the mailmerge, then merge to a new
document and send that. The new document should not be connected to a merge
data source, unless (unfortunately) it is attached to a template that is
connected to a data source, in which case things may be different.

If you want to send a Word mailmerge main document, you'll have to
disconnect the data source before you e-mail it. In all cases, changing the
document type from e.g. Form Letters to "Normal Word Document" (e.g. by
using the MailMerge toolbar) will disconnect the data source, lose any
filter/sort settings, but retain all fields.

Peter Jamieson
> How do I suppress the Reconnect to database when a document created with
> mailmerge is sent outside the company?
WordHazIt - 21 Jul 2006 19:33 GMT
Excellent observation.  If I create my merge fields to an excel spreadsheet
in a DOC file, it does not prompt.  If I use a template to create the
document, it prompts.  So for the million dollar question, is there a way to
turn it off if you have a template other than "cleaning" the document?

> If you want to e-mail the /result/ of the mailmerge, then merge to a new
> document and send that. The new document should not be connected to a merge
[quoted text clipped - 10 lines]
> > How do I suppress the Reconnect to database when a document created with
> > mailmerge is sent outside the company?
Peter Jamieson - 21 Jul 2006 21:33 GMT
It's probably better to have the following situation:
a. the template isn't attached to the data source
b. an AutoNew macro in the template connects new documents created from the
template to the data source.

e.g. something like the following for an Excel file with a Sheet called
"mysheet"
Sub AutoNew()

Dim strPathName As String
Dim strQuery As String

' Put the pathname of your Excel .xls
strpathName = "c:\myworkbooks\mywb.xls"

' Construct the Query - you may also need WHERE and ORDER BY
' clauses for filtering and sorting

strQuery = _
 "SELECT * FROM `mysheet$`"

' The following should be enough in Word 2003
' If you do not need WHERE clauses etc. you
' can delete the SQLStatement line

 ActiveDocument.MailMerge.OpenDataSource _
   Name:=strPathName, _
   SQLStatement:=strQuery

' Set the merge type you want
 ActiveDocument.MailMerge.MainDocumentType = wdFormLetters

' optionally set the destination you want
 ActiveDocument.MailMerge.Destination = wdSendToNewDocument

End Sub

If you aren't in a position to use macros, I'd say the simplest approach is
probably to do the same thing, but connect manually each time, which is
tedious, but will probably do the trick. It may be worth veryifying whether
or not the resultant document is trying to open the data source because /it/
has a data source attached, or because its template has. If it's only
because the template has, then that suggests that you have already
distributed the template to your recipients. Otherwise, if /their/ version
of the template didn't have a data source attached, the document would not
try to open a data source, IYSWIM. (I'd research this better but it's not
going to happen this evening).

Peter Jamieson

> Excellent observation.  If I create my merge fields to an excel
> spreadsheet
[quoted text clipped - 20 lines]
>> > with
>> > mailmerge is sent outside the company?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.