Creating an email with embedded macro code and buttons.

Hi,
I currently have a Java SE desktop application which sends out emails to customers with quotes attached as pdf documents. What i would like to do is create a email (using the javamail API) that will have two buttons in the body of the email namely Accept and Reject.
When the client gets the email, they can simply click on one of the two buttons which should send back an email to a certain email address. I do realise that using macros in the email might cause some problems for people who read their emails using any other program than MS Outlook, but for now I would just like to get this to work...
Is it possible to do the above using the javamail API? If so, please could you provide some sample code as I have searched everywhere for something like this but could not find anything.
Below is the macro code that could be used for the accept and reject buttons.
Private Sub Accept_Click()
    Dim O, m
    Set O = CreateObject("Outlook.Application")
    Set m = O.CreateItem(0)
    With m
        .To = "[email protected]"
        .CC = ""
        .BCC = ""
        .Subject = "Quote Accepted"
        .Body = ""
        .Send
    End With
    Set m = Nothing
    Set O = Nothing
End Sub
Private Sub Reject_Click()
    Dim O, m
    Set O = CreateObject("Outlook.Application")
    Set m = O.CreateItem(0)
    With m
        .To = "[email protected]"
        .CC = ""
        .BCC = ""
        .Subject = "Quote rejected"
        .Body = ""
        .Send
    End With
    Set m = Nothing
    Set O = Nothing
End SubThank you in advance!

Thanks for the reply!
No, i dont want JavaMail to run when the user clicks on a button in an outlook email.
What should happen is this:
An email should be sent to a person from a Java application after being "set up" or "created" using the javamail api. The email should have vba code embedded in it so that when the person on the receiving end receives the email, they see some (two, for now) buttons in the body of the email, and when they click on one of the buttons, it should run some of the macro code and send an email back to a certain address as specified in the vba code.
Now what i would like to know is if it is possible to embed vba code in an email and create buttons in the body of the message when the email is constructed using JavaMail before sending it off to the other person.
Edited by: javakarl on Mar 16, 2009 10:53 AM

Similar Messages

  • 48 Hours ago I started to upgrade to Mtn Lion on a now 10 day old IMac - 30 minutes ago I got the email with the content code and redeem code for the download from the app store - it said download was happening, but nothing happened for 30 min - FIX IT!

    48 Hours ago I started to upgrade to Mountain Lion on a now 10 day old IMac - 30 minutes ago I got the email with the content code and redeem code for the download from the app store - it said download was happening, but nothing happened for 30 min - HOW DO I (or you) FIX IT!?

    This is a User's Forum, yelling at us won't help. You have 90 days of customer support via telephone. Use them as they can interact with their system and hopefully get you back on track. Otherwise take it to them at the Genius Bar and have them make it good.

  • Web Intelligence: Save Report as PDF and with embedded HTML code

    Hi all.
    Sorry but I'm not able to find any post about this matter, please feel free to provide links if you know existing topics about this problem.
    We created a beautiful report with HTML5 code embedded into a blank cell and we are now trying to export it in a printable format (e.g.: PDF or HTML).
    As you know (as per manual information) it is not possible to export a report with embedded HTML code and keeping it in the output (cell with embedded HTML code is rendered blank).
    My question is: is there a known workaround or an alternative solution to export the report and keep its content?
    Print screen is not a valid option :-P
    Thanks for the support or any suggestions
    Stecas

    Product limitation; vote for change on ideaplace, etc. I don't believe there is an *easy* workaround, but see:
    https://scn.sap.com/thread/3149287
    HTH
    NMG

  • Creating order with out Company code and plant - just for pricing -possible

    Hi gurus
    Just for creating sales order (let us say no delivery and no billing, client was not intrested in the initial setup) for just pricing thing, does we really need Company code and plant. with out that just with sales org setup(sale org+D.C) can I create an order to full fil the pricing scenario.
    Please I need help on this
    Thanks
    Kris

    hi kris,
            we cannot create a order with out company code and plant , due to the following reasons
          we do not require the company code to create the order , but we require the plant to create a material and use it in the sales order .and we require a company code to create a customer .
    the pricing procedure is determined depending upon the sales area(sales org+distribution channel +division).
    please reward the points if it is helpful
    Regards,
    Murali

  • I get a weekly email with a PDF attachment and when I open it it's to large to print. To date I'm not able to find a way to shrink or adjust the size. The doc was created on M/S Office-excell

    I get a weekly email with a PDF attachment and when I open it it's to large to print and I know of no way to shrink or resize the doc. It's created in M/S excel. Can anymore assist....TX

    From: Test Screen Name [email protected]
    Sent: Sunday, August 04, 2013 11:32 AM
    To: gunner0490
    Subject: I'm not able to open PDF files in Adobe Reader XI.
    Re: I'm not able to open PDF files in Adobe Reader XI.
    created by Test Screen Name <http://forums.adobe.com/people/TestScreenName>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/5565198#5565198

  • When I forward an HTML email with embedded graphics to someone, it forwards it as plain text.. this is driving me batty.. how do I forward such mails INTACT??

    I have the latest Thunderbird installed on a new 64-bit Winblows Eight netbook.. fantastic program, but one problem is driving me absolutely batty, and after using the latest Thunderbird for weeks, I simply can't figure out how to fix it..
    I'm on a lot of mfr. and other kinds of mailing lists, like eBay watch list alerts, and so on.. these are not s p a m (although I get plenty of that.. who doesn't).. but lists I WANT to be on..
    Many such emails from those mailing lists are in HTML format with embedded graphics.. I'm not talking about graphic file attachments, but embedded graphics which are coming from the senders' servers, and appear AS a graphic in the email.. sometimes such emails are one huge graphic with hardly any text.. all well and good..
    However, here's the problem.. when I want to forward such an email to a friend, Thunderbird ALWAYS formats it as plain ASCII text.. I know this because I look in the "sent mail" folder, and can see that it has turned an HTML email with embedded graphics into plain ASCII text..
    I absolutely can't figure out how to get it to forward an HTML email with embedded graphics INTACT, so the sender receives it looking the way it looks when I receive it from a mailing list, or an advertiser, or eBay, or whoever..
    Is Thunderbird capable of forwarding an HTML email with embedded graphics INTACT?.. If so, how / where do I turn on that capability?..
    If the capability to do this isn't built into the program, is there an add-on I can install that will give it that ability?..
    I am not new to computers.. but this really has me stumped.. I want to put Thunderbird on my 32-bit Vista laptop and stop using its horrible "Windoze Mail" program, which I've been using for years, and is slower than snot, and has all kinds of other problems..
    So, assuming whoever reads this FULLY understands my question, PLEASE tell me how to get Thunderbird to have the ability to forward an HTML email with embedded graphics AS-IS, so the receiver(s) I forward it to see it exactly the way I see it when I receive it.. if that ability is built in, please tell me how to turn it on.. if that ability is not built-in, please tell me what add-on I need to install to give Thunderbird this capability.. if Thunderbird absolutely can't forward an HTML email with embedded graphics at all, please also tell me that..
    A virtual box of candy and a dozen long-stemmed roses to anyone who can give me a solution that works..
    Thanks..

    Dear Mr. Toad (my all-time favorite ride at Disneyland ;-) ..
    Thanks so much for your detailed reply.. my netbook is in the bedroom, turned off.. I (so far) only use it in the evening, in the bedroom.. I've saved your response, and will try your suggestions, and let you know if they solve the problem I described. I really appreciate you taking the time to post such a detailed reply..
    I can't answer your Thunderbird "configuration" questions, because I'm in the living room, using the crap Vista laptop, on which I plan to install Thunderbird, and then take Windoze Mail out in the street and drive over it a few times.. I'll get back to you one way or the other, and let you know if your instructions solved the problem, or not..
    I don't understand why Thunderbird "out of the box", so to speak, simply doesn't forward HTML emails with embedded graphics, (like Outlook Excess, and Winblows Mail do).. without having to go through those steps. I personally HATE HTML email, but over the years, it's become more and more prevelant.. so it's a problem I must fix..
    Thanks again..
    Harv..

  • What causes all my emails with embedded media to always be downloaded with the media broken or removed? How do I solve it?

    Whenever people send me emails with embedded videos or pictures, the email always comes in without the media. It will have just the empty box outline where it supposed to be with a tiny broken page icon in the top left-hand corner.
    I can't seem to find the cause and the solution and this has been happening for a few years already. Does it have anything to do with my account still being POP and not IMAP? What are the possible reasons and their solutions? Please help, thank you.

    I am not an expert in this area, but I think I might know what is going on. There is a difference between an 'embedded' picture and an 'attached' picture.
    An embedded picture has a link to the actual picture. If the link is to a site which is not accessible (such as the sender's own computer) then you will get a broken link.
    An attached picture is the actual picture file (.jpg, etc.) so you can always view it. If you check 'Display Attachments Inline', then when you scroll down through the email, the attachments will show up.
    So, bottom line: If the sender embeds a picture, it needs to link to a publicly accessible URL. Otherwise, it needs to be attached.

  • I lost the email with my verification code on it how do I get a new verification code?

    I would like to share some of my photos via email, but when I want to share them it asks for a verification code.  I don't have the email with that verification code, how do I get that code or get a new one?

    First go to the Preferences by going to:
    Edit >> Preferences
    And look for something like this:
    Fill in your details and click OK
    Now go to the Share Icon  and follow all the steps as if you are sending a photomail or email attachment and you will get a window where you can request a new code to be resent to you.  See this picture:

  • Created a document with FM Author 12 and added a template in FM12 to the document

    Created a document with FM Author 12 and added a template in FM12 to the document. Can't open the document again in FM Author 12 "This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel".

    Should both programs be in "Authoring" mode?

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

  • How do I send an email with a group address and not show the addresses/names of the recipients?

    How do I send an email with a group address and not show the addresses/names of the recipients?

    Use BCC.   That's blind carbon copy.   And copy paste the address into the BCC field.  It really depends what e-mail program you use how to enable BCC.

  • I am creating a slideshow with elements using photos and videos but the video sound doesnt play?

    I am creating a slideshow with elements using photos and videos but the video sound doesnt play?

     Hello jive
         I am playing it back in the slideshow editor/setting up part of
    programme where you determine photos/video to be included gaps between
    slides, music to play etc This goes through each phot and when comes
    to a video the background sound doesnt play, I am using windows 7 and
    elements 10.
         regards gins51

  • When I get an email with a pic in and I go to reply a box drops Dow and asks "save photo" when I click on that it "seems" like nothing happens, bot are they being automatically saved someplace, where?

    When I get an email with a pic in and I go to reply a box drops Dow and asks "save photo" when I click on that it "seems" like nothing happens, bot are they being automatically saved someplace, where?

    If photos are saved they go to the Camera Roll in the Photos App.

  • My iPad with this security code and forgot it,how can I get him ?  Is that 4 digit code

    my iPad with this security code and forgot it,how can I get him ?  Is that 4 digit code.

    Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

  • When i send email with 2 account 3G and wi-fi it take 15 minutes help

    when i send email with 2 account 3G and wi-fi it take 15 minutes help

    Welcome to Apple Support Communities.
    It's probably quite simple, and nothing to do with your Address Book group.
    It is a matter of 'junk mail' or 'spam' filtering on the recipient end, I think.
    1. Apparently not everyone in your Address Book group (12 of 15 apparently?) has your current email address among their 'permitted email addresses', so, your original email message ends up in their 'junk mail' or 'spam filter' or whatever it is called by their email provider. Some businesses and schools also filter incoming messages for subject, language, content, or by sender's address (one company I dealt with prohibited all incoming email from Hotmail, for example), so it could be filtered at that level. In that case, the recipient might have to specifically ask the IT department to add your email address to a 'permitted' list.
    2. When someone else in the group hits 'reply all', THEIR email address IS among the 'permitted email addresses' for everyone else, and they are in effect 'forwarding' your message from their email address, so the filtering affecting your email address does not affect their re-sending of your message.

Maybe you are looking for

  • Passing parameters to Update page

    Hi, I created the search/create/update page going by the instructions in the tutorial exercise. My primary key is a combination of employee number AND sequence number. When I query the employee in the search page and if the employee has more than one

  • HT1338 how to make my MacBook pro faster

    I was wondering if there is any software to clean and make my MacBook Pro faster and lighter??? I heard about the MacKeeper but I get some negative feedback about it....

  • Dragging Text in Table Cell

    In older versions of Pages, dragging text from a table cell into another table cell would cause the 2 cells to swap text. In '09 the dragged text overwrites the text in the cell it's dropped into. Is there a way to go back to the old way?

  • Start SJAS as a service at boot time in Linux

    I'm familiar with the app server, but I'm just getting back into Linux, so please bear with me. I haven't been able to find a way to start Sun Java Application Server Platform Edition 9 as a service when Fedora Core 6 boots. I've seen mention of some

  • Asking for username & password when trying to download podcast

    i am trying to download a new podcast to which I have been subscribing for the last year or so and it is asking me for a username and password. I have just recently updated my username for my ADSL login and am not sure whether this would be the reaso