E-mail hyperlinks: reading href value - email

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.

Related

Microsoft outlook Fetch with a form

I have a very crazy query related to the Microsoft Outlook. Is there any way to connect a form to Outlook, If suppose I want to attach a file so i will attach a file in my form, and then once i click on submit or any button then it should connect to the outlook, and outlook should open and the same attachment will appear in outlook.. Any suggestions or ideas?
Create an instance of the Outlook.Application object, call Application.CreateItem, call MailItem.Attachments.Add, then MailItem.Display.

How to send attachment with email in an ms access form

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

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

How can I have a check box control form submit properties?

I'm putting together a pretty basic InfoPath 2010 form that will be filled out in a browser (by non-logged in users) and will generate an email upon submission. The client that I building the site for would like a user to be able to check a box to mark whether they would like to have the email address that they provided be CC'd on the form submission.
I know how to CC the email upon submission, but I haven't found anything that talks about using a check box to control it. I have tried playing around with rules and submit button options, but couldn't get exactly what I wanted to stick.
What I need is: if a user checks a box, they will get CC'd upon submission, and if they leave the check box unchecked, then they receive no email.
Use the code behind of the InfoPath form to accomplish this. Get the XPath of the field associated with the checkbox in the Form_Submit method of the code behind. If the field returns true, go ahead and CC, otherwise, don't CC.

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