Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a hyperlink to an Excel template 1

Status
Not open for further replies.

ruthcali

Programmer
Apr 27, 2000
470
US
I am using Office 97.

I have an Excel template called Example.xlt.

From a form in my database, I want my Access database users to open the spreadsheet, but not to open the actual template. (I don't want anyone to accidentally change my template if they forget to do File, SaveAs!)

In other words, I want users to open Example1.xls.

I created a hyperlink in Access, but the hyperlink opens the template (Example.xlt), not the copy of the template (Example1.xls).

Anyone know how to make a hyperlink and have Access open a copy of the template?

Thanks,
Ruth


 
How abot using the "OutputTo" Method?

Simply store the file & path of your template in a text field (although calling a hyperlink will work as well...I think) and simply output a blank table.

Dim mytemplate As String

add_my_template_filepath = [Template_File]

DoCmd.OutputTo objecttype[, objectname][, outputformat][, outputfile][, autostart][, add_my_template_filepath]

 
Thanks for writing.

But there is no data that I want to output. I just want my users to click on a button in my access database and be taken to Example1.xls, a copy of a template.

But thanks again for writing.
 
Well, although I think using the OutputTo method will work, why don't you make Example1.xlt read-only? That way when someone tries to save it, they will be prompted to save as Example1.xls instead of trying to overwrite the template.
 
Shannon,
Making the template read only is perfect! Thanks. It's exactly what i was looking for.

For the OutputTo method, how could that work since i'm not outputting any data from my database?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top