Connecting Tech Pros Worldwide Forums | Help | Site Map

Req help: How do I open a MS Word file from Access?

Peppie
Guest
 
Posts: n/a
#1: Sep 9 '06
Hi all,

I created a button in an Access form that opens MS Word. Now I want
this button also to open a specific file. How do I code this?

Would it also be possible to let the user select the type of
template from a list? It would be perfect if this list does not
show the actual template files, but a short desribtion of the type
of file i.e.'report', 'proposal' etc.

Your help is much apprciated, Peppie (newbie)

----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------


RoyVidar
Guest
 
Posts: n/a
#2: Sep 9 '06

re: Req help: How do I open a MS Word file from Access?


"Peppie" <rpeppel@zonnet.nlwrote in message
<4502b342$0$15332$bf4948fe@news.tele2.nl>:
Quote:
Hi all,
>
I created a button in an Access form that opens MS Word. Now I want
this button also to open a specific file. How do I code this?
>
Would it also be possible to let the user select the type of
template from a list? It would be perfect if this list does not
show the actual template files, but a short desribtion of the type
of file i.e.'report', 'proposal' etc.
>
Your help is much apprciated, Peppie (newbie)
>
----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------
Depending on how/what you wish to to, there are several possibilities.

One is this wrapper for the ShellExecute API
http://www.mvps.org/access/api/api0018.htm

If you create a table containing your descriptions, and the file names,
you could use a combo or list on the form to allow the users to select
based on the description, but then use the file name when opening
Word.

--
Roy-Vidar


pietlinden@hotmail.com
Guest
 
Posts: n/a
#3: Sep 9 '06

re: Req help: How do I open a MS Word file from Access?


or you could be lazy and format the path as a hyperlink, and Word
would open it if the registry says to open doc files with Word...

Albert D. Kallal
Guest
 
Posts: n/a
#4: Sep 10 '06

re: Req help: How do I open a MS Word file from Access?


I created a button in an Access form that opens MS Word. Now I want
Quote:
this button also to open a specific file. How do I code this?
Just the following code:

application.FollowHyperlink "c:\mydcocs\bill.doc"

You can open any file using the above...(excel, pdf etc.).
Quote:
Would it also be possible to let the user select the type of
template from a list? It would be perfect if this list does not
show the actual template files, but a short desribtion of the type
of file i.e.'report', 'proposal' etc.
I have a working sample that automatically builds a list of word docs into a
lsit box, and lets you merge the CURRENT ONE record to the word document.
This is ideal for templates in applications. Further, my code allows you to
word-enable any form with ONE LINE of code, and it automatically handles the
template generation, and also selects the ONE record for you..

You can find this here:

http://www.members.shaw.ca/AlbertKal.../msaccess.html

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com


Peppie
Guest
 
Posts: n/a
#5: Sep 11 '06

re: Req help: How do I open a MS Word file from Access?


The solution that you offered was really helpfull.

Thanks, Peppie

----------------------------------------------
Posted with NewsLeecher v2.0 Beta 5
* Binary Usenet Leeching Made Easy
* http://www.newsleecher.com/?usenet
----------------------------------------------

Closed Thread