How to send attachment with email in an ms access form - forms

I was wondering would it be possible to create some sort of ms access form, where you would be able to upload any file and then be able to enter an email in another field, click a button, and send an email with said attachment to the entered email. So far I have the form created with an attachment field and below that I have a button and an empty field where the user can input an email that they would like to send the attachment to. My initial idea was to hard code the button to pull the attachment and send it to the desired email address using the .SendObject() function but i didn't find parameter for an attachment that I could send using the function.
:
In the highlighted box is where users can add any number of attachments and in the box to the right of the send button is a text box that would allow users to put in an email address that they would like to send it to.
If there is a better way of doing this with forms please let me know, I'm always up for learning new things.

You can interface with the outlook objectmodel to create a mailitem, then .send the message and .attach a file, but the file has to be accessible to the filesystem. If the file were embedded in access, you would have to export it out, then attach it. This link and this link should give you a good idea of how this process works.
If you don't have outlook available, then you will either need software that has a VBA compatible API, or you can use a webservice to post the mail, but both of those options are far to massive to talk about here, unless you can provide more specifics.
Edit since your edit:
If you can use Outlook, and you can just store the path to the file() in the attachments field as an array, then you an loop over the array with mailitem.attach to attach multiple files

Related

Power Automate sync/download to Dropbox file at URL link in email

I am trying to create a Power Automate flow that automatically syncs to Dropbox a file contained at a URL link in emails.
The email is always from the same email address, let's say: "example#example.com"
The URL link always has the same hyperlinked text: "Link to Signed Affidavit with Original Document Attached"
The URL link itself is dynamic and looks something like this (example): http://www.example.net/asp/showattachment.aspx?BlobID=aso23-gjin42-skgn34-23632
Each such email only contains one such link.
When the link is clicked, it goes to a PDF file in the webrowser. The link is not redirected to a different link.
I'd like this to trigger every time such an email is received. I'd like this to operate in the cloud without any desktop interaction.
Thanks!
I solved this myself.
In the "Compose" section, you need to parse out the URL from the email body using your own code. Below is what I used for my specific usage case. For my specific situation, I knew the URL would always be the same number of characters. If the URL length varies between emails, you'll need a more complex parse.
substring(outputs('Html_to_text')?['body'],add(58,indexof(outputs('Html_to_text')?['body'],'Link to Signed Affidavit')),95)

E-mail hyperlinks: reading href value

So when you click on an email hyperlink, it opens up a new mail message window in the default mail client (Outlook in my case). You can append Subject, Body, CC and BCC fields directly to the email hyperlink and your mail client will automatically populate those values in the corresponding boxes. An example hyperlink field would be:
Send Mail
So here we go. User clicks the hyperlink and a new inspector window is opened by Outlook. I'm listening to NewInspector event in my Outlook add-in. Can I somehow get the full href of the link that was clicked to bring up this inspector window?
The reason I want this is that I'm appending some custom fields to the hyperlink, which obviously are not understood by Outlook. Can I get the entire href value through some direct property, or COM?
No, the Outlook object model (nor the mailto: protocol) doesn't provide anything for that. Instead, you can automate Outlook to fill the required values programmatically. For example, if Outlook is already running you can use the following code:
// If so, use the GetActiveObject method to obtain the process and cast it to an Application object.
application = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application;
Read more about that in the How to: Get and Log On to an Instance of Outlook article. Also you may find the C# app automates Outlook (CSAutomateOutlook) sample project helpful.

How do I set the Google Form to automatically send to another user in HTML format other than respondent?

How do I set the form to automatically send to another user in HTML so it looks like the one the user gets when the user checks the "Send me a copy of my responses" box? I can't figure out how to set a script and/or trigger to send the HTML form to a user other than the respondent.
You can do this with google apps scripting, in particular the function MailApp.sendEmail. For HTML messages be sure to make use of the advanced parameters like htmlBody.
Check out the MailApp class for full details:
https://developers.google.com/apps-script/reference/mail/mail-app

Drupal email file attachment on form submit

I have a form built into a block on one of my content types, the content type has a file connected to the node.
I currently have a form the will send an email to the address you put in with a default message (ie if you put into the form, me#myemail.com, this email will receive a message saying "thank you for your interest.. ..please find your document attached" etc) However I'm struggling when it comes to attaching the file attachment of that node to the form, I have downloaded the mimemail module but there isn't a lot of documentation on how to do it.
(I apologise for repeating this question from the Drupal specific SO but this area seems to get more traffic)
Firstly, I would recommend you transition to webform rather than your own bespoke solution - as great and admirable as that is.
In looking around for a webform strategy to test and recommend, I found something that should do the job for you.
Have a look at this tutorial.

Disable moving to Outlook in SSRS?

I have a SQL Server Reporting Services report where one of the columns has user ids in email address format. When I export this report to PDF format and click on the user id it moves to Outlook.
I have read about disabling hyperlinks and used both:
(=IIFGlobals!RenderFormat.Name, "www.google.com",Nothing)
=IIf(Globals!RenderFormat.IsInteractive, "http://10.210.251.132/Reports/Pages/Folder.aspx", Nothing)
But neither is working. Is there any other way to do it?
If I understand your situation correctly, you have a report that displays some email addresses and when the report is rendered as a PDF document the email addresses appear as clickable links. When a user clicks one of the email address in the PDF document, the link launches Microsoft Outlook (to create a new email message).
Unfortunately I think this is a feature of PDF documents, or at least the PDFs generated by Reporting Services. The email address seems to be automatically identified as such and a link created in the document - I can't see any way to control this from within the report code.
The only thing I can suggest is to insert a space into the address to stop the PDF renderer identifying it and creating a link, e.g.
my.email#address.com > my.email # address.com