A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Call Link to MS Word from a User-defined Menu



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2005, 02:57 PM
LPC
external usenet poster
 
Posts: n/a
Default Call Link to MS Word from a User-defined Menu

Hi All, please help me with this problem.
I have a database that has its own Menu and Submenus, and a document in Word
that uses Mail Merge data from this database (I could have created a report
for this document, but, as far as I know, Access does not have the JUSTIFIED
ALIGNMENT feature (alignment both to the left and the right, as in MS Word,
so I decided to leave it in MS Word). What I want to do is to have a command
in the MENU showing the link to this document in Word, which should be open
ONLY FOR THE RECORD CORRESPONDING TO THAT ONE I AM CURRENTLY HAVING IN MS
ACCESS DATABASE (filtered).
Thanks for any help
  #2  
Old January 10th, 2005, 03:40 PM
Ilan
external usenet poster
 
Posts: n/a
Default

Hello,
you are in luck, i have done the same thing. First of
all create a macro with the action "RunApp." Then in the
command line, enter the directory extension for Microsoft
Word (It can be found through start -- run. It looks
something like this:
"c:/program files/office10/winword.exe").

Directly after the directory for Word, enter the
directory location for the document. Again - something
like this:
"c:/my documents/document1.doc"

Save the macro.

Go into the form design view and open the toolbox. From
there create a new command button. The wizard will come
up and under categories, select misc. and in the right
hand column click run macro. From there, follow the
steps for the command button to be linked to macro you
just created.

NOW, go to the query that is attached to the Word
document. In the criteria for one of the fields
(preferably an id field or something like that) Write the
following code:

[Forms]![NameOfForm]![NameOfField]

Mine looked something like this:
[Forms]![Client_Info]![ID]

So after all that, if you go to your form and click the
new button you made, it should pass all your info to word
and then all you have to do is merge it and you will get
your one record.

Hope that helps,
Ilan



-----Original Message-----
Hi All, please help me with this problem.
I have a database that has its own Menu and Submenus,

and a document in Word
that uses Mail Merge data from this database (I could

have created a report
for this document, but, as far as I know, Access does

not have the JUSTIFIED
ALIGNMENT feature (alignment both to the left and the

right, as in MS Word,
so I decided to leave it in MS Word). What I want to do

is to have a command
in the MENU showing the link to this document in Word,

which should be open
ONLY FOR THE RECORD CORRESPONDING TO THAT ONE I AM

CURRENTLY HAVING IN MS
ACCESS DATABASE (filtered).
Thanks for any help
.

  #3  
Old January 11th, 2005, 04:13 PM
LPC
external usenet poster
 
Posts: n/a
Default

Hi Ilan,
Thank you very much for having replied to my question. As I am currently on
travel for a few days, I would follow your instructions as soon as I get back
and I´ll let you know of the result. Once again, lots of thank.
Regards,
LPC

"Ilan" wrote:

Hello,
you are in luck, i have done the same thing. First of
all create a macro with the action "RunApp." Then in the
command line, enter the directory extension for Microsoft
Word (It can be found through start -- run. It looks
something like this:
"c:/program files/office10/winword.exe").

Directly after the directory for Word, enter the
directory location for the document. Again - something
like this:
"c:/my documents/document1.doc"

Save the macro.

Go into the form design view and open the toolbox. From
there create a new command button. The wizard will come
up and under categories, select misc. and in the right
hand column click run macro. From there, follow the
steps for the command button to be linked to macro you
just created.

NOW, go to the query that is attached to the Word
document. In the criteria for one of the fields
(preferably an id field or something like that) Write the
following code:

[Forms]![NameOfForm]![NameOfField]

Mine looked something like this:
[Forms]![Client_Info]![ID]

So after all that, if you go to your form and click the
new button you made, it should pass all your info to word
and then all you have to do is merge it and you will get
your one record.

Hope that helps,
Ilan



-----Original Message-----
Hi All, please help me with this problem.
I have a database that has its own Menu and Submenus,

and a document in Word
that uses Mail Merge data from this database (I could

have created a report
for this document, but, as far as I know, Access does

not have the JUSTIFIED
ALIGNMENT feature (alignment both to the left and the

right, as in MS Word,
so I decided to leave it in MS Word). What I want to do

is to have a command
in the MENU showing the link to this document in Word,

which should be open
ONLY FOR THE RECORD CORRESPONDING TO THAT ONE I AM

CURRENTLY HAVING IN MS
ACCESS DATABASE (filtered).
Thanks for any help
.


  #4  
Old January 12th, 2005, 06:33 AM
LPC
external usenet poster
 
Posts: n/a
Default


Hi Ilan,
I followed your instructions and it works brillantly, for the first phase
(call Word and open the document), but as to the filtered records, I still
have problem because my Word document is a Main Merge document (it already
contains the record source from the database, with the fields picked up and
set in place). What I want is to open this document and it directly goes to
the record I have in the form (not the procedure that you indicated me,
namely to pass the information to Word before merging it). I have tried to
select the record source that is a Query with criteria, but Word seems not to
recognize these Queries (they do not appear in the list of tables and queries
of the source database). So, the result I have so far is that I can open that
document from my database, but I still have to search for the record that I
want "manually" in Word. If you, or anyone else, can help me figure out this
problem, I would much appreciate it.

Thanks in advance,

LPC

  #5  
Old January 13th, 2005, 06:43 AM
LPC
external usenet poster
 
Posts: n/a
Default

Hi, I've found the answer.

To open the word document and merge it immediately from Access, I changed
the query type from Selection query to Make-Table Query. The table created by
that database then will serve as the source table for the word document.
That's all.

LPC
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuous breaks convert to next page breaks Jennifer Hunt General Discussion 2 December 30th, 2004 05:45 PM
macro in word js General Discussion 1 December 28th, 2004 03:01 AM
REVEAL CODES feature like in Word Perfect? MBSS New Users 4 November 21st, 2004 07:47 PM
wordperfect documents to word General Discussion 3 September 6th, 2004 03:17 AM
Codes G.W. Page Layout 3 April 29th, 2004 10:50 PM


All times are GMT +1. The time now is 10:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.