Email link to open a file

G

Guest

How do I write the HTML code to create a link in an email to open an access
database? Not sure if this belongs in the group or in the access group but I
figured I would start here. I can create links but I can't figure out out to
create the code to open a database via a hyperlink.
 
S

Sue Mosher [MVP-Outlook]

The syntax would be the same as the link to open any other file: file://z:\\mydatabase.mdb assuming that z: is a shared network drive.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I've tried that format but all it does is open a box to "My Documents" and
it's looking for an executable file. Am I doing something wrong? My syntax is
the same as what you said but the only difference would be the drive letter
and the path to the db. What if the path was on someone's C drive? Would that
make a difference?
 
S

Sue Mosher [MVP-Outlook]

The exact file path shouldn't matter, but it must be 100% accurate. If any folder or file names contain spaces, you'll have to "escape" those spaces with %20, as you would in a web page.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I didn't know about the "%20" to replace any spaces. Now I'm getting an error
that says "Can't open specified file". Here is the code I'm using. Does it
look right to you?

..HTMLBody = "<a
href=file://C:\Program%20Files\Microsoft%20Office\Office\MSACCESS.EXE>AccessPath</a>"
 
S

Sue Mosher [MVP-Outlook]

I don't know what this is supposed to be:

MSACCESS.EXE>AccessPath

It certainly isn't a legal file name. Command line arguments work only in Windows command prompts and scripts. You can't use them in a URL.

If you want to open an Access database, the link needs to be the path to the .mdb database file, as in my original example.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I was trying to just start a session of access with that line but now I
understand why that isn't working. Yes I'm trying to open a database from the
link. Here's what I'm using now as my line of code. And I'm getting a blank
email when I do this. There isn't any link at all showing up.

..HTMLBody = .HTMLBody & "<br><a href='" stAccessLink & "'><small>GoTo New
Record</small></a><br>"

stAccessLink = "file://path to db"
 
G

Guest

May I add a question with is link to this one?

By putting, for example in Word, the following:
<Outlook:Ibox/~Message_object>

and when you click on that link, it opens the message named Message_object

But how what is the link which can open an attached document (named for
instance "toto.doc" without the "") to that email ... if this ispossible ?

Additional questions : if two personal files are simultaneously opened ,
each in one Inbox (respectively corresponding to files
"file1.pst" and "file2.pst"), how to write the link? and does this work
if only one pst file is already opened in Outlook (in that cas, how to write
the link such as C:\Mail\ etc . ?

Thank you incadvance for your answer.

U007
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top