Russell the Muscle wrote:
Where I work we have Thousands of Word Templates that when opened loads
data form a SQL Server database. Because we have so many templates I
created a access database so we can easly search though them.
Everything works fine except a hyperlink to the Word Templates and the
hyperlink opens the template but not in the desired maner, it opens it
to be edited and not a new document that runs agains the Sql server. Is
there a way to hperlink to the word templates or do I have to pass
vairables to word so word open up the templates.
Don't use hyperlinks, they're bad. They're hard coded to do unexpected
things, e.g. web addresses don't open in your default browser, they open
in IE whether you like it or not.
Use ShellExecute API (
http://www.mvps.org/access/api/api0018.htm) to
open the template on click or whatever and you'll need to modify that
code (sorry, only version I could find ATM) so you can pass in the
second parameter as the shell action, in this case "New" and not the
default "Open" although in the case of shelling out to a .dot file, it
may just use the default action for .dot ("new").
--
[Oo=w=oO]