Marshall Brooks
Member
- Local time
- Today, 17:04
- Joined
- Feb 28, 2023
- Messages
- 727
This will be hard to explain, but it used to work and now it does not - both in Office 2016 and Office M365.
I am generating E-mails from my Database. The E-mail body is in an external table .(so that I can change the text of the link addresses without releasing an updated database).
Inside the database, this works:
If I copy the StrBody line into my table, this USED to work:
Recently, this stopped working. The E-mail is generated and it LOOKS like it contains hyperlinks, but the link addresses are empty and nothing happens when you click on them.
However, elsewhere in the database, I have a table with nothing but directory paths in the fields and this works:
It is not the issue with "%20" in place of " " because I don't have that in the internal database and I added it to the table and it still didn't work.
Unless I'm missing something obvious (which is likely), I see two options:
I am generating E-mails from my Database. The E-mail body is in an external table .(so that I can change the text of the link addresses without releasing an updated database).
Inside the database, this works:
Code:
Sub Test()
strbody = "<p style='font-family:calibri (Body);font-size:15'>Files are available in the <a href=""\\Network Path with spaces"">Network Path</a> folder.</p>"
Call SendEmail
End Sub
Code:
SubTest
strbody = Nz(ELookup("[EM_Body]", "[tblEmail]", "[Group] = 'Group A'"), "")
Call SendEmail
End Sub
Recently, this stopped working. The E-mail is generated and it LOOKS like it contains hyperlinks, but the link addresses are empty and nothing happens when you click on them.
However, elsewhere in the database, I have a table with nothing but directory paths in the fields and this works:
Code:
Sub Test()
strbody = "<p style='font-family:calibri (Body);font-size:15'>Files are in the <a href=" & Replace(Nz(ELookup("[NetworkPath]", "[tblNetworkPaths]", "[NetworkName] = 'Path3'"), ""), Space$(1), "%20") & """>Network Path</a> folder.</p>"
Call SendEmail
End Sub
It is not the issue with "%20" in place of " " because I don't have that in the internal database and I added it to the table and it still didn't work.
Unless I'm missing something obvious (which is likely), I see two options:
- I can hard-code the e-mail body in the database and it will work as desired, but I'll have to put out a database revision if I ever need to update it.
- I can PROBABLY add the links to the network paths table, and save them as variables and change my EM_BODY field text to call out the links, but I'm not sure why this is required (especially since it USED to work without it).