473,855 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email Item as Link from Access

2,322 Recognized Expert Moderator Top Contributor
I know how to create email from within Access, using outlook automation.
User has the access frontend installed
Office 2003

Is it possible to create a hyperlink in a email that will accomplish the following, when receiver clicks it:?

Open the access front-end on the users PC.
Open relevant form
Goto relevant Item

If its not possible in the way I have described it, I have several modifications that could be acceptable, for example, it would be ok to require that the user has the frontend open when clicking the link. It would also be ok if I had to install a add-on to the users outlook.
Jan 19 '12 #1
54 14420
8,834 Recognized Expert Expert
I didn't have much time to look into this for you, but I have had limited success Inserting a Pseudo Hyperlink in an Outlook E-Mail pointing to an Access front End. It is at least a start.
Expand|Select|Wrap|Line Numbers
  1. 'Provides the Send Mail automation. Send an E-Mail
  2. 'and Attachment from Access via Outlook
  3. Dim oLook As Object
  4. Dim oMail As Object
  5. Dim olns As Outlook.NameSpace
  6. Dim strTO As String
  7. Dim strMessageBody As String
  8. Dim strPathToFrontEnd As String
  9. Dim strSubject As String
  11. Set oLook = CreateObject("Outlook.Application")
  12. Set olns = oLook.GetNamespace("MAPI")
  13. Set oMail = oLook.CreateItem(0)
  15. '******************************* USER DEFINED SECTION ********************************
  16. strTO = "BartSimpson@aol.com"                                                       '*
  17. strPathToFrontEnd = "<file://C:\Test\FE.mdb>"                                       '*
  18. strMessageBody = "Click on Hyperlink to Open Front End Database" & vbCrLf & _
  19.                   vbCrLf & strPathToFrontEnd                                        '*
  20. strSubject = "Test Project for Inserting Hyperlink in Outlook E-Mail Pointing " & _
  21.              "to Front Ebd Database"                                                '*
  22. '*************************************************************************************
  24. With oMail
  25.  .To = strTO
  26.  .Body = strMessageBody
  27.  .Subject = strSubject
  28.    .Display
  29.      '.Send (Should you wish to immediately Send the E-Mail without displaying Outlook)
  30. End With
  32. Set oMail = Nothing
  33. Set oLook = Nothing
Jan 19 '12 #2
332 Contributor
I don't know about a hyperlink in an email, but in my case, say I have a new person that needs a database interface. I attach in the email a text file that all the user has to do is save the file on the desktop and change the txt extension to bat. That is because out implementation of Outlook does not allow sending bat files.

This is the content of the bat file:
Expand|Select|Wrap|Line Numbers
  1. @echo off
  2. set destDir="C:\"
  3. set srcDir="\\Your own source folder full path\"
  4. set srcFile="BFT_FE.mdb"
  5. set destFile="BFT_FE.mdb"
  6. echo %destDir%
  8. if exist %destDir%%destFile% attrib -h %destDir%%destFile%
  9. copy /Y /B %srcDir%%srcFile% %destDir%%destFile% /V
  11. attrib +h %destDir%%destFile%
  13. start /B "C:\Program Files\microsoft office\OFFICE11\MSACCESS.EXE" %destDir%%destFile%
This is waht is used to start the Front End. When ever this is double clicked, a new front end is copied and opened. It makes release of new front ends a snap.
Jan 19 '12 #3
8,834 Recognized Expert Expert
Nice approach, why the /B Command Line Argument on the Copy Operation (Line #9), since it is not a Binary File?
Jan 19 '12 #4
332 Contributor
Well, I am more of a linux guy when comes time to command line stuff :), but as far as I know, an mdb file is a binary file.

In any case, I just tried without the /B switch (Line 9) and everything works fine. i.e. the front ends gets copied over and opens fine.
Jan 19 '12 #5
32,584 Recognized Expert Moderator MVP
According to the quick help :
Expand|Select|Wrap|Line Numbers
  1. /B   Start application without creating a new window.
  2.      The application has ^C handling ignored.
  3.      Unless the application enables ^C processing, ^Break is the only way to interrupt the application.
An alternative for line #13 might be :
Expand|Select|Wrap|Line Numbers
  1. Start /D%destDir% "%ProgramFiles%\Microsoft Office\OFFICE11\MSACCESS.EXE" %destFile%
Is it possible to create a hyperlink in an email that will accomplish the following, when receiver clicks it?
I believe it is, as long as the hyperlink can point to a shortcut or CMD file on the server. Invoking a Database From the Command Line gives examples of how a database can allow itself to be controlled from a command-line parameter. Obviously, such a command-line could simply be included in a shortcut if that were all that was involved.
Jan 19 '12 #6
332 Contributor
Yes, that /B swith is for the start function, not the copy.

In fact I have another one that simply goes like so, no start command:
Expand|Select|Wrap|Line Numbers
  1. copy /Y /B \\Img-lsl-v001860\dglepm.dv$\DLEPS\DLEPS_3\Shared_Working_Documents\SWEET_FE.mdb "C:\Documents and Settings\"%USERNAME%\Desktop\SWEET_FE.mdb /V
  2. "C:\Program Files\microsoft office\OFFICE11\MSACCESS.EXE" "C:\Documents and Settings\%USERNAME%\Desktop\Sweet_FE.mdb" /wrkgrp "\\Img-lsl-v001860\dglepm.dv$\DLEPS\DLEPS_3\Shared_Working_Documents\Sweet.mdw"
The one above has a workgroup specified.
The first example I submitted was created after that one. And I think I had issues when not using start at the time.
In my environment, shortcuts, mdb files etc will not go through Outlook and I got tired of sending emails to advise people of new front end release then receive back a whack of out of office reply.

Anyway, you get the idea.
Jan 19 '12 #7
32,584 Recognized Expert Moderator MVP
Without wishing to divert from Smiley's question Mario, did you try sending a link to an internal-network based shortcut instead of the the text of the command file itself? I would expect that could work as well for you, and avoid the manual part for the user.
Jan 19 '12 #8
332 Contributor
Because you are asking, I know you will not tell me to start a new thread :-)

Even an html link will not go through. Whether it is sent internally or not. The file get renamed as soon as it is inserted in the email. Not even sent yet... I tried to send it to me anyway, then the anti-virus pops up.

But from a user point of view, it is not too bad. All I do is send it as a text file (.txt) then they rename it bat (.bat). Then they acknowledge the change of extension, end of story. I do not send the commands as is in the body of the email if that is what you think. I think this is what you might think... That is a lot of thinking.
Jan 19 '12 #9
2,322 Recognized Expert Moderator Top Contributor
Thanks for all your suggestions.

I have tried it, and I am able to create a hyperlink that will cause the database to open. However I can't seem to pass the argument that I would like. For now I have tried with a simple procedure called gotorid, which for now doesn't take any arguments to keep it simple. At some point if succesfull, I would like it to take the ID of the review to open.

I have tried:
Expand|Select|Wrap|Line Numbers
  1. file:///C:\Documents and Settings\aec.OSS.000\Desktop\Test\TestMail.mdb ;gotorid
  3. file:///C:\Documents and Settings\aec.OSS.000\Desktop\Test\TestMail.mdb \x gotorid
  5. file:///C:\Documents and Settings\aec.OSS.000\Desktop\Test\TestMail.mdb \x ; gotorid
  7. "file:///C:\Documents and Settings\aec.OSS.000\Desktop\Test\TestMail.mdb" ;gotorid
But it keeps saying "Cannot open the specified file"
Jan 19 '12 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

by: James Fraley | last post by:
I've created a MS Access form and get the exact same results as below? Now, I believe it has something to do with storing EMails, not OLE. I will appreciate any help! --------------------------------------------------------------- I've created a form with an OLE obect linked to a MS Access OLE Object. I need to store an email from Outlook in the field. Everything works fine if I drop the email on my desktop and then pick
by: Alan | last post by:
Hello, I trying to export my email to an access database. Outlook already this function, but not all the fields are available once the export is complet. The time & date stamps are not available. Also, the attachment file names field is not present. Are there other means of obtaining these information? Regards,
by: gj | last post by:
If anyone has worked with this I would be interested to find out. I have successfully put send/receive emails into an application using SMTP/POP server but would like to do something more professional with IMAP. I basically want a full email client in Access that can connect to an IMAP server. I have played with a few ActiveX controls but would like others experiences. TIA
by: Daven Thrice | last post by:
I know how to send email out of Access, and that's no problem. What I need to figure out is how to receive email into access. Say that I give access an email address, such as access@daven.com. I want all email that comes to that address to be received directly by the database so that I can parse out the files. I'm thinking that, worst case, I can write my own email client using the winsock control. But is that my only alternative?
by: tymperance | last post by:
I have a report that I currently email directly from Access as an attachment using a macro. I need to make it be the body of the email instead. Can that be accomplished without extensive VBA programming? Thanks!
by: diwadube2003 | last post by:
I get a Warning message while automatically sending email through MS Access, using Outlook. Can anybody help me out with this.
by: ttamilvanan81 | last post by:
Hai. I needto Receive Email using Ms-Access and Outlook. On the receiving end, the user receives the email at the Outlook. When they opens the Email, the message box should have a button called “Save to Access”. When this button is pressed, a dialog box should pop up where the user can choose a contact name and a job name and click on SAVE Here contact name and job name are in the access table fields. We go to select any one contact...
by: PPPPPPPPP | last post by:
I Am Not Able To Link Access Database In Visual Basic .please Help Me To Do So . Thanking You In Anticipation.
by: wassimdaccache | last post by:
Hello Experts; I have a wireless router TP-link I made security phrase for it. What i am trying to do is to configure a d-link access point as a repeater for the TP-link and always not working :(!!! while i am scanning in my access point (d-link) I see the tp-link and I am able to connect but when I scan using my wifi on my laptop I'm not seeing the D-link . Why ?
by: davekearley | last post by:
Hi all, first post, looks like a great site. I have a small problem with Access. I need to link to an ODBC table (SQL7) but when i go to the link dialogue, the ODBC entry is missing. I have other linked tables in this DB and they all re-link ok so the system DSN is working fine. Any ideas? I have not linked a table for some time and cant remember how to get the ODBC option back.
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.