Results 1 to 5 of 5
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371

    Recipient Opening a link

    Hi Guy's hope you are all good

    I need a little help on this one

    I am emailing out an address to a shipping company and the end destination contact

    all works very well apart from opening the link

    if i use links that i am opening myself, i would set IE such as Chrome and Shell Chrome then add URL



    However, the link i am sending out i wouldn't Shell anything because if i am correct, i would never know what IE program relevant contacts are using so i am only sending out the link only but doesn't open

    is there a short method to change what i have done here ?

    Bear in mind for data protection, i have scribbled the address and postcode out.


    Code:
    Const Q = """"Dim strPC as String ' Client PostCode
    Dim sEndDest as String
    Dim sText2 as String
    
    
    NOTE: sBoxStart and sBoxEnd is a table setting
    
    
    sEndDest = "<a href=" & Q & "End Destination:" & Q & "<br>" & "<br>" & "https://www.google.co.uk/maps/dir/" & Replace(strPC, " ", "") & "</a>"
    
    
    sText2 = sText2 & strHDFS & "<B>END USER / DESTINATION DETAILS:</B>" & strFE & "|" & _
            sBoxStart & "|" & strFS & _
                sDealer & "|" & _
                "&emsp;" & sAdd1 & "|" & _
                "&emsp;&emsp; " & sAdd2 & "|" & _
                "&emsp;&emsp; " & sTown & "|" & _
                "&emsp;&emsp; " & strPC & "||" & _
                sEndDest & strFE & "|" & sBoxEnd & "||"
    In the HTMLmail body, I am replacing pipes with "<br>"


    Below is the info on HTML Mail Body but the link won't click

    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	23.0 KB 
ID:	49785

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I think you have the href parts backwards as well as missing characters: HTML a href Attribute (w3schools.com)

    Code:
    sEndDest = "<a href='https://www.google.co.uk/maps/dir/" & Replace(strPC, " ", "") & "'>" & Q & "End Destination:" & Q & "</a><br><br>"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Thank you June7, that certainly opens, i am going to check links like this, i copied from existing code and adjusted the finer details and check where the differences are (href being backwards)

    This is now the result and link opens, how can i remove the Quotes at each end of View Destination Details ?

    Click image for larger version. 

Name:	Capture.JPG 
Views:	10 
Size:	9.6 KB 
ID:	49786

  4. #4
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,371
    Hi June7, silly me, i think i just need to use Replace on sEndDest in sText2 string, replace "" with nothing

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Is that what the Q variable is for - quote marks? Don't use them. Remove the concatenation of Q variable.

    No, has nothing to do with the Replace operation.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Get email recipient
    By carmenv323 in forum Access
    Replies: 7
    Last Post: 04-21-2022, 12:24 PM
  2. sending an outlook appointment to a recipient
    By DMT Dave in forum Access
    Replies: 6
    Last Post: 11-06-2020, 12:38 PM
  3. Replies: 16
    Last Post: 05-21-2015, 07:50 PM
  4. Error on SendObject method - Unknown recipient
    By Glenn_Suggs in forum Access
    Replies: 4
    Last Post: 07-11-2013, 12:11 PM
  5. Link Criteria no working when opening new form
    By ETCallHome in forum Forms
    Replies: 1
    Last Post: 06-17-2011, 05:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums