Reply
 
Thread Tools Display Modes
  #1   Report Post  
goraya
 
Posts: n/a
Default DotNet Data Table as Mail Merge Data Source

Hi All
Is it possible to set Data Table as Mail Merge data source?????
A little detail why I am not using text file:
In my solution there a custom button that user can refresh data source
when he refreshes all the merge fields are collected from document and
saved to text file and set that file as data source.I close the file
stream and stream writer.So far as things are going fine........
But if he clicks the refresh data source button again an error is
prompted that Unable to access Text file because it is being used by
another process.why is it so as I close all the file related objects?
So I decide to go for data table for above mensioned reason and the
final word is
Is it possible to set Data Table as Mail Merge data source?????
With best regards
Qumer

  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

What kind of Data Table? If you are talking about an ADO.NET data object,
the answer is that you cannot set a mail merge data source to be an object
inside a process - the data source has to be an external file of some kind,
e.g. a text file, table inside a .mdb, table inside a SQL database
accessible via OLEDB or ODBC, etc.

How are you actually coding the "refresh" ? If you are doing an
OpenDataSource in Word, you /may/ need to disconnect the data source first,
e.g.

ActiveDocument.MailMerge.DocumentType = wdNotAMergeDocument

However, if you do that, you will lose any sort/filter options that may have
been set, and you may also need to re-establish the Mail Merge Main Document
type.

Peter Jamieson


"goraya" wrote in message
oups.com...
Hi All
Is it possible to set Data Table as Mail Merge data source?????
A little detail why I am not using text file:
In my solution there a custom button that user can refresh data source
when he refreshes all the merge fields are collected from document and
saved to text file and set that file as data source.I close the file
stream and stream writer.So far as things are going fine........
But if he clicks the refresh data source button again an error is
prompted that Unable to access Text file because it is being used by
another process.why is it so as I close all the file related objects?
So I decide to go for data table for above mensioned reason and the
final word is
Is it possible to set Data Table as Mail Merge data source?????
With best regards
Qumer



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
mail merge default data source location Rebecca Mailmerge 3 June 24th 05 12:09 PM
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 06:10 AM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 16th 05 12:38 AM
Mail merge data source problem campwes Mailmerge 1 January 25th 05 08:16 PM
Mail merge error occurs when filtering Excel data source Dave Mailmerge 1 December 2nd 04 11:46 PM


All times are GMT +1. The time now is 10:51 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"