🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
3 messages
3 total messages Started by Ant�nio Ferreira Thu, 09 Jul 1998 00:00
Word Automation from Access 2.0... HELP!!!!
#29
Author: Ant�nio Ferreira
Date: Thu, 09 Jul 1998 00:00
41 lines
2533 bytes
Hi,

What I want to do is:

From Access 2 call winword 6, open a pre-defined document and 
write the contents of a table in that same document. 
Each Field of the Table must be placed in a precise location of the
document, for this I Defined Several bookmarks!!!

or

From Access 2 call winword 6, open a pre-defined document and 
make word merge the data from the Record that is selected in the Table
of Access!

Ex: Access-> Table Clients
		1 | Antonio Ferreira | Portugal
	+------>	2 | John Peter | England
	|	3 | Mario Andretti | Italy
	|
 	When I Press a Button that is placed somewhere in the form
	I want to call word, open the document and merge the data from
	this record directly to the Word Document,  Print That Page,
	and return the control to the Access's form!

Is it possible?!
The best I done was call winword6, and open the document!!
When I Try to goto a determined bookmark Access gives the
following message "invalid bookmark name", since I Couldn't do
these I try to Call the "Merge Data" that would show the record!!
I failed also!!! :(

I must deliver a solution to this problem until Saturday, so please If
you know how to make such a thing, please tell me, by follow-up the
solution to this newsgroup or to my E-Mail Adress:
"amjferreira@mail.telepac.pt"

Thanks for any answer to this problem,

Best Regards,
Ant�nio Ferreira
Re: Word Automation from Access 2.0... HELP!!!!
#31
Author: bgubrud
Date: Fri, 10 Jul 1998 00:00
61 lines
3235 bytes
Hi Antonio,

I've accomplished something similiar by writing the data to a text file.  I
then wrote an AutoOpen macro in Word that read the text file and put the data
in the desired places in the Word document.  The Word macro had logic that
deleted the text file after it had applied the data.  It only attempts to
apply the data if the text file was found.  (This is so it doesn't reapply
the same data everytime the document opens).  I realize this isn't an elegant
solution, or a correct one, but it works.  In the absence of better advice,
it might be an interim solution to help you meet your deadline.

Good Luck
Bart

In article <35a623ab.6618279@news.telepac.pt>,
  amjferreira@mail.telepac.pt (Ant�nio Ferreira) wrote:
> Hi,
>
> What I want to do is:
>
> From Access 2 call winword 6, open a pre-defined document and
> write the contents of a table in that same document.
> Each Field of the Table must be placed in a precise location of the
> document, for this I Defined Several bookmarks!!!
>
> or
>
> From Access 2 call winword 6, open a pre-defined document and
> make word merge the data from the Record that is selected in the Table
> of Access!
>
> Ex: Access-> Table Clients
> 		1 | Antonio Ferreira | Portugal
> 	+------>	2 | John Peter | England
> 	|	3 | Mario Andretti | Italy
> 	|
>  	When I Press a Button that is placed somewhere in the form
> 	I want to call word, open the document and merge the data from
> 	this record directly to the Word Document,  Print That Page,
> 	and return the control to the Access's form!
>
> Is it possible?!
> The best I done was call winword6, and open the document!!
> When I Try to goto a determined bookmark Access gives the
> following message "invalid bookmark name", since I Couldn't do
> these I try to Call the "Merge Data" that would show the record!!
> I failed also!!! :(
>
> I must deliver a solution to this problem until Saturday, so please If
> you know how to make such a thing, please tell me, by follow-up the
> solution to this newsgroup or to my E-Mail Adress:
> "amjferreira@mail.telepac.pt"
>
> Thanks for any answer to this problem,
>
> Best Regards,
> Ant�nio Ferreira
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
Re: Word Automation from Access 2.0... HELP!!!!
#32
Author: Ant�nio Ferreira
Date: Fri, 10 Jul 1998 00:00
24 lines
1857 bytes
On Fri, 10 Jul 1998 15:23:46 GMT, bgubrud@my-dejanews.com wrote:

Hi Bart,

>I've accomplished something similiar by writing the data to a text file.  
>I then wrote an AutoOpen macro in Word that read the text file and put the data
>in the desired places in the Word document.  The Word macro had logic that
>deleted the text file after it had applied the data.  It only attempts to
>apply the data if the text file was found.  (This is so it doesn't reapply
>the same data everytime the document opens).  I realize this isn't an elegant
>solution, or a correct one, but it works.  
Interesting Idea!! ;)

>In the absence of better advice, it might be an interim solution to help you meet 
>your deadline.
I followed your idea, and as you said It's not perfect but hey!! It's
working!!

I will try to do it using OLE Automation anyway, but If I see that I'm
not getting somewhere I will use the implementation of your Idea!!

Thanks a Lot,
Best Regards,
Ant�nio Ferreira
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads