When I take a snippet or screenshot of something I'm working on and need to send it in an e-mail (MS Outlook), I don't always want to paste it in-line in the HTML body of the e-mail. There are times where I would like to add the image as an attachment.
In the interest of making this repetitive task a bit more efficient, is it possible for me to accomplish this without having to first save the image/screenshot and add an attachment manually? Perhaps a macro to convert an in-line image in my e-mail to an attachment on the same e-mail?
Downloading add-ons or plugin-ins is a no go; I work in a large corporate environment where this is near impossible to do.
Thank you!
What exactly do you mean by inline images? Images hosted on the remote HTTP servers and referenced by the HTML body? Or embedded image attachment referenced by the HTML body by their cid's? In the latter case, the attachments are already in the MailItem.Attachments collection.
You cannot simply convert an inline (embedded image) image into an attachment, you will need to save the inline attachment to a folder location, delete the inline attachment, and reattach the saved attachment.
Related
I am sending email using cl_bcs class as PDF attachment.Now, when I do issue output to in VA02/03 tcode,it works and in email I can open the attachment.But,on press of save in change mode in va02 tcode,as output type is automatically triggered using condition record,it sends the mail but the PDF attachment(which is adobe form only) shows corrupted.
Any pointers?
Thanks for all your help.I found out the solution. The reason was that the pdf from Adobe Form FM was not generating correctly.So before converting to Binary, we need to pass docparams-getpdf = X.This solved the issue and attachment is opening like charm.I am using cl_bcs class for mail functionality.
I am trying generate several individual pdfs from html in a group of elements within a node on a webpage with jsPDF. (Report cards for students). Then I need to email the individual report cards to each students parent using JavaMail.
The problem is: I don't want to save the pdf files to disk as they are generated, instead I want to programmatically loop through the report card elements in the page (id="'studentCard_' + studentId", generate the individual pdfs from the html and store or push each individual pdf into an array or object on the fly (as they are created) that I can then pass over to JavaMail and loop through to attach each individual pdf to the associated parents email.
I can convert the html to pdf without a hitch...
I am just not sure as to how to then attach this pdf to the email since the only option is to pdf.save(filename), and I don't want to actually SAVE each individually generated pdf in the loop to disk - I just want to temporarily store the generated file before I attach it to the emails and send it out.
I have converted the pdf to a blob and a blob URL and I am able to then push the blob into an array. Can I just convert the pdf to a blob or blob url and push it to an array and then loop through that array and attach that to the email. Is this my Solution to convert each pdf to a blob, then push the blob to an array to be passed on to JavaMail to loop through?
I don't know anything about this aspect of my problem. If I attach a blob to the email, or insert the blob URL in the body, when the parent clicks on the file to download it, or clicks on the link inserted into the body, will it automatically be converted back to PDF format for them to read by their own mail program or in the browser? How do I do this correctly?
You may use IndexedDB, the client-side storage of the browser. I like JsStore, an IndexedDB wrapper. I have used it for a couple of my projects. It's pretty neat.
pdf.save(filename) is NOT the only option. You should be able to use pdf.output(datauristring) or pdf.output('blob') and save it to IndexedDB. Depends on your pdf file size, you may even use localStorage, which is easier to use but has much less storage than idb.
I am trying to open a .pdf file within Excel like an iframe in HTML.
My requirement is:
Save the path of multiple PDF files in Excel.
Excel should open each .pdf file within Excel itself (no need to open that in a separate .pdf window).
It should be like iframe in HTML. The user should be able
to view the .pdf within Excel itself.
I know this is little weird, but can anybody help me?
you could probably get the filenames via vba.
here's some that claim to work:
Loop through files in a folder using VBA?
So far as opening a pdf in excel - thats kinda pushing it.
Since your request is exotic I can think of an exotic workaround:
If you can spare the interactivity you can simply make copies and convert your pdfs to word formats to work with them and load them in that way. I've seen people convert pdfs to Jpgs just to load them in some other documents but thats rudimentary and really fringe.
Otherwise you are facing a lot of custom coding that needs to make it possible.
I using vb.net code to send emails. There is no problem in sending plain text emails but I want to use some formating (bold, coloured text et.) I am writing my message body in a richtextbox but do not know how to do the formatting.
Also I want to insert picture. Please help regarding that too.
Thank you very much.
You basically need to make a html file with css for the elements you want to be colored. This you add to your email as an attachment with mime-type set to text/html.
For images you add these as base64 encoded attachments and use their Content-ID as CID: reference in your html code.
I wrote a little more about this in my answer to this thread:
Send email includes image like Outlook does?
I'd like to create an html email with a normal attachement (a pdf file), and an inline attachment (an image) as well. These two attachment types work perfectly individually, but don't seem to live well together: the normal attachement disappears (at least in Outlook) as soon as there is an inline attachment.
Is it a bad thing to mix attachment types?
Yes it is a bad idea to mix attachment types as this is a documented issue currently with Action Mailer. Refer to https://github.com/rails/rails/issues/2686 for more details.