Create the link

accessman2

Registered User.
Local time
Today, 14:38
Joined
Sep 15, 2005
Messages
335
Private Sub Command0_Click()

Dim MiOutlook As Outlook.Application
Dim MiCorreo As Outlook.MailItem

Dim NombreFichero As String
Dim NombreFicheroConRuta As String


Set MiOutlook = New Outlook.Application

Set MiCorreo = MiOutlook.CreateItem(olMailItem)

With MiCorreo

.To = "alanfong@yahoo.com"

.Subject = "Test"

.Body = "<A HREF='C:\Microsoft Office XP\Office10\MSACCESS.EXE' D:\db1.mdb /WRKGRP 'D:\Secured.mdw' >Open database</A>"

.Send

End With

Set MiCorreo = Nothing
Set MiOutlook = Nothing
End Sub


Send mail via outlook from MS Access:
Suppose the database is in the sharing drive, everyone can access it. I want to create a link when I send mail, which the link can open the database.
However, the link doesn't work.

Does anybody know that? Thanks.
 
Hi,
I try to modify it.
Private Sub Command0_Click()


Dim MiOutlook As Outlook.Application
Dim MiCorreo As Outlook.MailItem

Dim NombreFichero As String
Dim NombreFicheroConRuta As String

Set MiOutlook = New Outlook.Application

Set MiCorreo = MiOutlook.CreateItem(olMailItem)

With MiCorreo

.To = "alanfong@yahoo.com"


.Subject = "Test"


.BodyFormat = olFormatHTML

.HTMLBody = "<a href='C:\db1.mdb'>Open database</a>"
.Send

End With

Set MiCorreo = Nothing
Set MiOutlook = Nothing
End Sub

It works.
But, if I add the security in the database file, and then change the code like this,
.HTMLBody = "<A HREF='C:\Microsoft Office XP\Office10\MSACCESS.EXE' C:\db1.mdb /WRKGRP 'C:\Secured.mdw' >Open database</A>"

It doesn't work. I do NOT want to join the workgroup (security file). I like to use the shortcut to open the database.

Does anybody know how to solve it? Thanks.
 
Hi accessman2,

Not sure if I am correct here but what happens if you try

.HTMLBody = "<A HREF='C:\Microsoft Office XP\Office10\MSACCESS.EXE' C:\db1.mdb >Open database</A>"


Let me know.

Robert88
 
Hi accessman2,

Do a search for system.mdw, the default Access one and then place copy in D:\ next to other.

Then try executing

.Body = "<A HREF='C:\Microsoft Office XP\Office10\MSACCESS.EXE' D:\db1.mdb /WRKGRP 'D:\system.mdw' >Open database</A>"

Does this open it?

With your quote;

It doesn't work. I do NOT want to join the workgroup (security file). I like to use the shortcut to open the database.

If you do not want a logon remove the \password from the Admin account and the logon will be removed. Or you could check the link below for How can I "de-secure" a database.

http://support.microsoft.com/default.aspx?scid=/support/access/content/secfaq.asp#_Toc493299703

Robert88
 
Last edited:
.HTMLBody = "<A HREF='C:\Microsoft Office XP\Office10\MSACCESS.EXE' C:\db1.mdb /WRKGRP 'C:\Secured.mdw' >Open database</A>"

De-secured, I know that, but that's not what I want.
I have to setup the security for db1.mdb, but when I send the mail via outlook, I want every member to open the database directly from outlook if I put the link at over there.
I should use the Secured.mdw.

And, Can I open by shortcut link in the outlook, I create a shortcut and store in the D drive. This shortcut can have this:
"C:\Microsoft Office XP\Office10\MSACCESS.EXE" "C:\db1.mdb" "/WRKGRP 'C:\Secured.mdw"

If I click on it, it works. But I want to create the link which shortcut via outlook.

Can I setup the shortcut when I send e-mail from Access to Outlook as following:
.HTMLBody = "<A HREF='shortcut' >Open database</A>"

Is it run? It doesn't work.

Thanks.
 

Users who are viewing this thread

Back
Top Bottom