473,836 Members | 2,084 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
54 14411
332 Contributor
Yes, that is what I meant to say.
I guess one issue that bugs me now is that whatever codes that has to go in MS Outlook would have to be installed individually??
Jan 25 '12 #41
332 Contributor
maybe use this, or a variation of, at line #8
Expand|Select|Wrap|Line Numbers
  1. If .SenderName = "TheSmileyCoder" And Left(.Subject, 10) = "For Review" Then
That would help a bit.

By the way, for me .Sender is not working. I have to use .SenderName.
Jan 25 '12 #42
8,834 Recognized Expert Expert
I guess one issue that bugs me now is that whatever codes that has to go in MS Outlook would have to be installed individually??
Unfortunately, yes. You would also have to Close, then Open Outlook so that the myOItems Object Variable gets Initialized - therein lies the problemo. Only the OP (TheSmileyCoder ) can decide if this is worth the effort or not, if he even considers this approach.

P.S. - Odd that .Sender does not work - what Version of Outlook are you using?
Expand|Select|Wrap|Line Numbers
  1. If .SenderName = "TheSmileyCoder" And Left(.Subject, 10) = "For Review" Then
is probably a better Option than mine.
Jan 25 '12 #43
32,584 Recognized Expert Moderator MVP
It seems that the overarching difficulty involved with this is that a hyperlink seems unable to pass parameters. Most frustrating.

In the absence of this facility I've struggled to come up with a way of passing control to the recipient of one of these emails which doesn't involve the user having to follow any instructions more complicated than : Click This, and preferably doesn't involve specialist software developed for an application, Outlook, that isn't directly related to the facility.

I think I have a viable solution. It involves sending an Excel spreadsheet with embedded code (NB. The code must be runnable by the recipient of course.) that runs code to execute the command found in cell A1. Once the code has executed it closes itself down (and can even close Excel if it discovers that it's the only open workbook). Let me know if this sounds like a viable approach for you.
Jan 25 '12 #44
32,584 Recognized Expert Moderator MVP
I developed a workbook to handle my suggestion, as well as a database to test that the workbook is working as intended. I've changed the data in the workbook to obscure my identity from the public (this time), but the only data is the command line in cell A1 which you can easily configure for yourself. In fact, the design of this is such that you are expected to update the spreadsheet from code anyway.

There are numerous possible options with this. The database is deliberately set up with a space in the name to illustrate how such names should be handled. It simply echoes the command parameter passed and is purely there to illustrate proof of concept.

Have fun :-)

PS. In case it's not clear, the idea is that the instigator (Smiley) would first prepare the data in the RunCmd.Xls spreadsheet to reflect what they wanted the user to run at the far end. This would then be sent to the user, who would simply open the workbook from there by double-clicking on it. As it opens it will execute the command from the Excel code (using Shell()).

Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  3. Private Sub Workbook_Open()
  4.     Dim strMsg As String, strCmd As String
  6.     strCmd = Range("A1")
  7.     strCmd = Replace(strCmd, "%AccessPath%", Environ("AccessPath"))
  8.     strCmd = Replace(strCmd, "%ProgramFiles%", Environ("ProgramFiles"))
  9.     strMsg = "You are about to run the command :%L%L%C"
  10.     strMsg = Replace(strMsg, "%L", vbNewLine)
  11.     strMsg = Replace(strMsg, "%C", strCmd)
  12.     If MsgBox(Prompt:=strMsg, _
  13.               Buttons:=vbOKCancel Or vbQuestion, _
  14.               Title:="RunCommand") = vbOK Then _
  15.         Call Shell(PathName:=strCmd, WindowStyle:=vbNormalFocus)
  16.     If Application.Workbooks.Count > 1 Then
  17.         Call Me.Close
  18.     Else
  19.         Call Application.Quit
  20.     End If
  21. End Sub
PS. Attachment removed, as a later version may be found at post #52.
Jan 25 '12 #45
2,322 Recognized Expert Moderator Top Contributor
@ NeoPa: Your excel idea is nice thinking, however I am pursuing the outlook way. I think using excel as a hyperlink is a bit confusing to the users :P

I think I have something decent cooked up so far, though its quite different from coding in Access at least in the way I am used to.

So far, I have written code that enables/disables the toolbar based on a few parameters tied to the SelectionChange event for the ActiveExplorer. Item must be in the inbox folder, and must be a mail item (not a task/appointment...s o on). Now too this, I will need to add something that checks for certain charecters/codes in the email body, which I have not yet decided on. Im still mostly in the feasibility study of this project. However its fairly easy done, standard string manipulation.

The toolbar once activated will read/parse the email, and look for whatever code I decided to use, and based on that open the database, probably by automation, or by shell command with command line parameters.

My main concern now lies in distribution. I don't so much mind going around to the 20-50 users and installing some extra code in their outlook, is the maintenance of said code that bothers me more. I will have to look into both how to distribute the code, as well as update it. That however is a probably a matter for another question.
Jan 25 '12 #46
2,322 Recognized Expert Moderator Top Contributor
I do see that your excel suggestion does have the benefit of not having to go around to each outlook installation and managing software there. I will give it some more thought...
Jan 25 '12 #47
2,322 Recognized Expert Moderator Top Contributor
I just want to tack this onto the thread before I forget it. You can get the MSAccess.exe path from the excel file if you have set a reference to the Access object model, and then use:
Expand|Select|Wrap|Line Numbers
  1. SysCmd(acSysCmdAccessDir)
Users must also allow macros, in order for the excel code to run. I think a potential problem with the Excel solution is that we will soon be upgrading to Office 2010, and I fear that I will have to look into alot of macro security issues at that time.
Jan 26 '12 #48
332 Contributor
What if another approach is considered? No Outlook coding, no Excel. From the original posting:
Expand|Select|Wrap|Line Numbers
  1. 1.  Open the access front-end on the users PC.
  2. 2.  Open relevant form
  3. 3.  Goto relevant Item
1. This can be done, no problem

Now in the Access application, suppose you have an ActionItems table containing fields such as username, actionID, isVerified. This table would be maintained by The Smiley.

When the recipient gets the email, the hyperlink is clicked, Access starts and goes to the specific form (Stage 2) containing the ActionItems records filtered for the user. The user clicks the actionID which in turns opens the form containing the items to review (Stage 3).

So one click to start access, one click to go to each item to review, maybe on click to mark the item reviewed...
Jan 26 '12 #49
8,834 Recognized Expert Expert
@TheSmileyCoder :
Two last questions:
  1. Do you have access to the User's PCs on a Network?
  2. Do you have Full Rights to the Folder where the User's Database resides?
Jan 26 '12 #50

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: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 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.