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 / September 2004

Tip: Looking for answers? Try searching our database.

Filling mail fields without database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bjorn Buijing - 16 Sep 2004 07:05 GMT
The company I'm working for has quite a lot of mail merge documents.
I'm writing an customer relation application and want to merge the data with
those documents.
So my question is wether there is a way to fill those fields (for example
with VBA or something) without having an active db connection from word.
I've been going through a lot of documentation and websites, but thus far
I've found zip, so any help in the right direction is greatly appreciated.

Bjorn
Peter Jamieson - 16 Sep 2004 10:26 GMT
Not completely sure what you are hoping to achieve, but...
a. their mail merge documents will already be connected to a specific data
source. To connect them to anything else, you will obviously have to alter
their documents (perhaps programmatically). I suppose you could do it
temporarily by opening their documents and closing without save, or by
copying their documents. Not sure what you need to achieve there.
b. if you are simply trying to avoid having to have Word connect to /your/
database engine, the simplest approach is probably to export your data to
<whatever format you want> and connect their documents to that exported
data. But if for example your application is sitting on a server, you, and
the users, would need to have to have access to a directory accessible via
Windows networking.

Or if I missed the point, let us know in more detail what you need to do and
what you need to avoid.

Signature

Peter Jamieson

> The company I'm working for has quite a lot of mail merge documents.
> I'm writing an customer relation application and want to merge the data with
[quoted text clipped - 5 lines]
>
> Bjorn
Cindy M  -WordMVP- - 17 Sep 2004 12:53 GMT
Hi Bjorn,

> The company I'm working for has quite a lot of mail merge documents.
> I'm writing an customer relation application and want to merge the data with
[quoted text clipped - 3 lines]
> I've been going through a lot of documentation and websites, but thus far
> I've found zip, so any help in the right direction is greatly appreciated.

Theoretically, you could automate Word, open the document, and cycle
through the Fields collection, checking the .Code property (or .Result
property) for each field. From this, you can get the name of the field
and replace the field's range with the data...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
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.