[AccessD] Questions on Access 2007 Controlling Word with Windows Automation

Steve Goodhall steve at goodhall.info
Wed Feb 29 14:31:42 CST 2012


It can be done.  That said, it might be easier to do it entirely in Word.   
You could write VBA to assess the SQL DB using ODBC and then build your Word  
document.  Even if I were going to eventually plug the code into Access I  
would probably build it first in Word because I could get better  
Intellisense assistance and simplify the debugging.  I did a bunch of this  
kind of thing using Access, Excel and Word for my Masters Thesis in 2002.  
The code is all documented in the Thesis which is on my web site but it  
isn't very accessible in that format.  I will see what else I can dig up but  
it may take a few days.

Steve Goodhall, MSCS, PMP

-----Original message-----
From: Brad Marks <BradM at blackforestltd.com>
To: Access Developers discussion and problem solving  
<accessd at databaseadvisors.com>
Sent: Wed, Feb 29, 2012 20:10:01 GMT+00:00
Subject: [AccessD] Questions on Access 2007 Controlling Word with Windows  
Automation

All,

This is our first "adventure" of using Windows Automation with Access
and Word.

Here is what we are trying to accomplish...

We have a purchased application that stores data in SQL Server.  We
cannot change how the data is stored.

There is one memo field in the database that contains a long string of
text.  

We can easily pull this field into a small test Access 2007 application.

We would like to use Windows Automation to control Word from Access and
add formatting such as changing some select words in the memo field to
be Bold on the generated Word document.

Is this possible?

In other words, can we parse through a single field in Access and add
formatting to the generated Word Document.  

An example or a link to an example on the web would be wonderful.

Thanks,
Brad  

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list