Word/ VBA/ Access

O

ossie1971

Hi

I am a web developer who has managed to talk himself into a project that
sounded relatively easy when I suggested it, now I'm stuck and hoping for a
little enlightenment.

I have created an intranet for my client part of which contains a customer
management interface, now when my client receives a new customer they have
15 word documents that need to be completed. The majority of these only
require the customers name and address entering at certain points in the
docs. My idea was that because we already enter the info once into the DB we
should be able to re-use that for the documents we need to print. I
converted a few of the docs into access reports and used queries to retrieve
the correct data. The problems began when I tried to convert some longer
docs and access cannot cope with the lenght (Aside from a multitude of other
formatting issues)

How can I automatically populate the dynamic areas of my word documents with
data from access. In an asp.net web page I would use something like
<%# Container.DataItem("ClientName") %> or use asp:labels
In word I have no idea, itried the query wizard but it just wanted to insert
a table at the top of my document

Any idea's, Suggestions or Code samples would be greatly appreciated

Thanks

Ossie

FYI Server is win 2k3 with SQL2000
 
J

Jonathan West

Hi Ossie,

What you might try is to create some custom document properties in the Word
document, use DOCPROPERTY fields within the document to display the contents
of the fields at the apppropriate placeholders. Then you can use the
dsofile.dll library to populate the document with the correct text, and then
send the Word document off to its destination, where it will contain the
correct information when it is pened and printed.

This article tells you more and provides a location for downloading
dosfile.dll.

Dsofile.exe Lets You Edit Office Document Properties from Visual Basic and
ASP
http://support.microsoft.com/?kbid=224351
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top