Can you attach a select file into a mail in "Outlook" then send to a specify address?

I have been looking around and trying to find ways to do the following with extendscript:
1. Open ‘Outlook’
2. Create a new mail
3. Attach the files which was selected to a mail then send to a specify address
Is this possible?
I found this that dose it for MAC but I need to do it in a windows platform

Hi John
Well not a very inDesign question is it but this will do what you want.
// Send selected files as attachments through outlook on windows 
// By Trevor htps://forums.adobe.com/message/6546861#6546861
// Need a custom script , willing to pay for it send me a private message.
var notify = true; // set to true if you want a popup measage to say that the mail is sending
var delay = 1.5 // the number of seconds you want the popup to appear
var ToAddress = "[email protected]"; // You might need to change this 
var MessageSubject = "Howdy Barack, take a look at this"; // You might need to change this
// bodyText set at line 27 Below
var myAttachments =  File.openDialog ("Select the files you wish to attach", "All Files: *.*", true);
if (!myAttachments) {
    alert("Sorry mate I can't send your attachments if you don't select them\rPlease try again next year\rThanks");
    exit();
var n, MessageAttachments = [], bodyFileNames = [], fName = "";
for (n = 0; n < myAttachments.length; n++) {
    fName = myAttachments[n].fsName;
    MessageAttachments[n] = 'newMail.Attachments.Add("' + fName + '")';
    bodyFileNames[n] = fName;
MessageAttachments = MessageAttachments.join("\r") + "\r";
bodyFileNames = bodyFileNames.join("\" & vbNewLine & \"");
    // the \" & vbNewLine & \" is a way off putting in line feads
MessageBody = "Howdy i spent yonks of time making this. \" & vbNewLine & \"" + bodyFileNames; // You might need to change this
//VBS code very very very heavily based on the answer of ShaddowFox333 http://www.tek-tips.com/viewthread.cfm?qid=728333 
myVBS = '''Dim ToAddress
Dim FromAddress
Dim MessageSubject
Dim MessageBody
Dim MessageAttachment
Dim ol, ns, newMail
ToAddress = "''' + ToAddress + '''"
MessageSubject = "''' + MessageSubject + '''"
MessageBody = "''' + MessageBody + '''"
Set ol = CreateObject("Outlook.Application")
Set ns = ol.getNamespace("MAPI")
Set newMail = ol.CreateItem(olMailItem)
newMail.Subject = MessageSubject
newMail.Body = MessageBody & vbCrLf
newMail.RecipIents.Add(ToAddress)
''' +
MessageAttachments + "newMail.Send";
try {
    app.doScript (myVBS, ScriptLanguage.VISUAL_BASIC, undefined, UndoModes.AUTO_UNDO);
    if (notify) {
        var tempFile = new File (Folder.temp + "/" + +new Date + ".vbs");
        tempFile.open('w');
        tempFile.write('''Set shell = CreateObject("Wscript.Shell")
                    delay = ''' + delay + '''
                    shell.Popup "Sending document by outlook", delay, "InDesign Mail Manager", 64
                    Set fso = CreateObject("Scripting.FileSystemObject")
                    fso.DeleteFile("''' + tempFile.fsName + '''"),DeleteReadOnly
        tempFile.close();
        tempFile.execute();
catch (e) {alert ("Drat goofed up")}
Trevor
OTT: Congrats Uwe

Similar Messages

  • How can you convert a PDF File into a picture format for uploading?

    How can you convert a PDF File into a picture format for uploading?

    If you have Acrobat 11, you'd select: File > Save As Other > Image
    and select one of the available image formats.

  • How can I attach a pdf file to outgoing mail without it opening up within the message?

    How can I attach a pdf file to outgoing mail without in opening up within the message?

    You can use the Share button on Preview's toolbar. Choosing Email pops open Mail with the PDF already iconified as an attachment. If it doesn't behave this nicely for you, select the PDF in Mail and choose the right contextual menu, where you will find View as Icon. I also have Send Windows-Friendly attachments enabled.

  • How can I attach a jpg file in a mail message as the file icon, not as an opened image in the text?

    How can I attach a jpg file in a mail message as the file icon, not as an opened image in the text?

    what's wrong with this picture

  • Can you open InDesign CS files into CS5?

    Hi all,
    My former company wishes to upgrade their ooooooooooold software to the latest version:) They currently have InDesign CS and want to make the leap to CS5. The question is...will it be possible to open their current CS files into CS5 once they make the switch? This is really important of course.
    Thank you very much in advance for your help:)
    Christine

    Did you try https://www.adobe.com/cfusion/tdrc/index.cfm?ref=sup&product=indesign?
    Anyhow, if it fails, it should be the latter, or something else busted; Creative Suite Trial Versions says:
    CS5.5 trials
    Creative Suite 5.5 product trials will be available for download soon.  Be notified when they are available. 
    Back to top
    CS5 trials for suites
    Trials of CS5 products are still available for download, below.

  • Can you upload a php file into Adobe Muse when hosting with BC?

    My client has sent me a .txt file from a supplier and asked me to upload to the site we are creating in Adobe Muse.
    They said, 'You will need to save this file as a php file for it to work, and upload it to your website - you can use it as a stand-alone, but I'd recommend just "including" it in another page, so you get your branding, etc. around it.'
    Can anyone assist in converting a .txt to .php and then loading it to Adobe Muse? I will be using Business Catalyst to host the site once complete.
    Thanks, we are really stuck here with a short deadline.
    Patrick

    Hi Patrick
    Unfortunately you cannot run any server side script like PHP within BC. Please refer to BC FAQ
    http://www.businesscatalyst.com/faqs/product-information

  • HOW CAN YOU PROCESS AN AUDIO FILE IN LABVIEW?I NEED TO TIME-PITCH SCALE IT

    hello guys.
    can you insert an audio file into labview for further processing?i need to get an audio file (stored on my computer) and further process it for time-pitch scale.does anybody know how?any pointers will much be appreciated.
    regards
    alex

    hi there
    open the "Graphics & Sound" palette from the functions menu to use vis for reading/Writing wavefiles, search the examples shipped with LV for first steps. use the VIs in the "Analyze" functions palette to modify the data.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Can you export a raw file photo with Lightroom adjustments attached?

    Can you export a raw file photo from Lightroom with Lightroom adjustments attached in some way?  If not what is the equivalent?  There are some individuals I would like to send the full data of the raw file, but with the non-destructive Lightroom adjustments layered on top.
    --Gerry 

    You can select "Original" as the file type, in Export. This saves out a copy of the imported source file into the selected location, labelling the current adjustments onto that image. When this is sent to somebody and imported to LR / opened in ACR, these metadata will be found and used automatically, with the exact same outcome as within your own LR Catalog - provided the LR / ACR versions are sufficiently compatible, and provided camera and lens profiles applied to the image, are present in both contexts.
    LR uses whatever method is normal when writing metadata, for each file type involved. So, if one imported file is a proprietary Raw file, LR will write an XMP file alongside. If another is capable of having metadata written into its file header, LR will do that instead.
    One important difference between doing this, vs writing LR metadata out to your original imported file, and sending that: the Export Original method will work in the same way, just as successfully, for one or more Virtual Copy versions (duplicating physically as needed), as it will for the primary Master version - relating to a given imported file.

  • Can you save an mp3 file that you receive as an attachment to an email?

    Can you save an mp3 file you receive as an attachment to an email?

    Irwinwilliam-
    With other attachments, you can press and hold on the attachment icon.  One of the options that may appear is "Open In".  Choosing that, any App that is capable of reading the attachment should show up as a choice.  When opening the document that way, a copy is transferred to the App.  I have not tried with an MP3 file.
    For MP3, I think the Music App should be a choice.  If so, the file should then appear with your other music.
    If an inappropriate App appears in "Open In", you may be able to use it as a conduit to transfer the attachment to your computer.  Run iTunes on your computer with the iPad connected.  Select the iPad under DEVICES, and click on Apps at the top of the window.  Scroll down to File Sharing and select that App.  If successful, your document will appear to the right in the Documents window, where you can select it and Save As.
    Fred

  • How do you convert a jpeg file into word document so i can edit it?

    How do you convert a jpeg file into word document so i can edit it?

    http://office.microsoft.com/en-us/mac-word-help/training-edit-pictures-in-office -for-mac-2011-RZ103709558.aspx

  • Can you make an existing document into a .pdf file?

    can you make an existing document into a .pdf file? I used to use pdf factory before my system recovery. I do not want to reinstall that program. Can I do this in Acrobat Reader 7?

    Adobe sell Acrobat (in various versions) to do this.
    Aandi Inston

  • Can i convert AIFF audio file into an MP3 file please?

    Can i convert AIFF audio file into an MP3 file please? I will be doing this on an imac 2008 model. thank you for help!

    Since this is the Logic forum and you may be working in Logic, you dont even need iTunes. To convert Aiff to MP3:
    1 - Go to the Bin>Audio Files
    2 - Select the Audio File you want to convert ( and not a region or edit of it)
    3 - Go to Audio File next to the Link icon ( Audio - Edit - View ) and down the menu to Copy/Convert.. gives lots of options
    HTAH
    (hope that also helps)
    MS

  • How can I embed a pdf file into the body of an email?

    How can I embed a pdf file into the body of an email?

    The problem is defining what it even means to “embed” a PDF file in the body of an e-mail, especially if you are dealing with a multiple page PDF file.
    E-mail is either pure text, rich text (something akin to RTF in Word), or HTML. PDF is not compatible with any of these. Thus, to embed a PDF file, something has to be converted and that means the PDF would be converted to a less graphically rich raster format. But is that what you would really want?
    I think that the MacOS and iOS e-mail clients do under some circumstances place an attached PDF file within HTML segments and by clicking on same, you get the equivalent of extracting the full PDF file, but I have no real experience with that.
    Another alternative is HTML with a proxy image with a hyperlink to an external PDF file that is invoked when you click on the hyperlink.
    Perhaps you can explain what you are really trying to accomplish and what the recipient of such an e-mail's actual experience would be?
              - Dov

  • In Forms Central, attempting to do file attachment, but "select File" option is grayed lout/unavailable - how do I make it available?

    in Forms Central, attempting to do file attachment, but "select File" option is grayed lout/unavailable - how do I make it available?

    Is it necessary that all the files are on the local hard disks? In the case of the laptop I could understand this if the laptop is also used outside the network, but the desktops should stay in place, no?
    It could be as easy as to make a shortcut on all the computers to the samba-share and tell the inlaws that they have to use the samba-share to store their (shared) files.
    You are correct about this but I doubt they would remember to use this all the time so I want to sync the folders just in case.
    Assuming the laptop is always going to be in the same IP address when it connects to the network (which is unlikely in default configurations), you could create a script that checks for the existence of the machine on the network then perform a sync.  I had a script written in Python somewhere that would check to make sure the server side was up and run unison, but it could be modified to check for the laptop and copy files.  Let me know if that's something you're interested in and I can post it for you.
    This sounds like what I'm looking for. Also I wander If it could be done by NetBIOS  name instead of ip address? This way It wouldn't matter.
    The script sounds like what I'm looking for though
    Thanks for the help!

  • Can I merge 3 jpeg files into one PDF on one page?

    Can I merge 3 jpeg files into one PDF on one page? For example: scanned newspaper article was too big for one scan process, I had to scan article 3 times. Can I merge these 3 jpegs and position them like columns?

    Do you have Acrobat? If so, you can use the Add Image tool to place your images on the page where you want them to be. Alternatively, you can combine all 3 to a single PDF and then send that PDF to the PDF Printer, selecting the Multiple option to get them to appear on a single page of the new file.

Maybe you are looking for

  • Serial Number Replication from R/3 TO CRM

    Hi Experts, Currently the Equipments are replicating from R/3 to CRM. If we want to replicate only Serial Number as Individual Object , will their be any effect on the equipment already replicated to CRM or  what will be the effect of replicating Onl

  • Create a login page that does not link to database

    Hi, I am really new to muse and would like to seek some help....sorry if any similar questions have been asked. I am making a website interface for my assignment, and i need to create a login page, how can i make a text box for entering the login ID

  • How to upload images in Oracle Database11g

    Can Oracle Database 11g store images of any type? If yes, please help me how to do it?

  • Nokia belle toolbar and many more features

    google translation hello recommendations and look forward to Slide left or right to run the toolbar toolbar NFC: on / off GPS: on / off fm transmitter: on / off -screen dial: on / off 2G/3G: mode offline: The display brightness: Click to reduce dupli

  • I Cloud help please

    Good morning - I am trying to set up ICloud on my up to date MAC laptop and it does not offer me the Icloud under settings.  It has Mobile Me on the cloud icon and that will not let me in.  Help???.