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

Steve Goodhall steve at goodhall.info
Wed Feb 29 15:12:43 CST 2012


It's going to take more than that, mostly navigating the Word object model  
and identifying the pieces of text to format.

Steve Goodhall, MSCS, PMP

-----Original message-----
From: Stuart McLachlan <stuart at lexacorp.com.pg>
To: Access Developers discussion and problem solving  
<accessd at databaseadvisors.com>
Sent: Wed, Feb 29, 2012 21:08:24 GMT+00:00
Subject: Re: [AccessD] Questions on Access 2007 Controlling Word with  
Windows Automation

First thing I would try is paste the text ino a Word document and then  
record a Word macro 
to do the formatting.

Then create an Access function which just creates a new document in Word and  
dumps the 
text into it.

Finally, copy your word macro into your access function and modify it as  
required.

-- 
Stuart 

On 29 Feb 2012 at 14:07, Brad Marks wrote:

> 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
> 


-- 
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