+ Reply to Thread
Results 1 to 9 of 9

fetch data from excel and paste in .OFT file and send mailsss

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question fetch data from excel and paste in .OFT file and send mailsss

    Hi,

    I have a .OFT file. i have my template typed and saved it as outlook file template.

    I need a Excel VBA macro to generate email of this template (This i can achieve through ron de bruin excel automation and other stuffs in internet)
    but the difficulty i found is that the macro must pick data from an excel file and paste it in the .OFT file (fields) like

    Date from excel and paste it in date field in .OFT
    Amount from excel and paste it in Amount field in .OFT

    ..etc...

    and send mail.

    Same vice macro need to create mails with the same .oft file and fetch data one by one in excel and generate mail( .display) then i will review it and send it.

    Each row in excel is a email....



    Can this be achieved.... am limited to resources, hence i didn't attahed .OFT file here with. but attached sample excel file with data needs to be fetched and keep in mail template and mail ID's for To and Cc fields.


    Thanks for your time and consideration.
    Attached Files Attached Files
    Last edited by bmbalamurali; 10-10-2014 at 01:43 PM. Reason: correction
    Bala

  2. #2
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Exclamation Re: fetch data from excel and paste in .OFT file and send mailsss

    Hi All,

    With ron de bruin codes... i tried below code to accomplish my task...ofcourse i know am doing errors in using multiple For Each Loops.
    Am keeping on getting lot of compile errors..... Can anyone please help me in this....

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by bmbalamurali; 10-13-2014 at 04:18 PM. Reason: adding attachment

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: fetch data from excel and paste in .OFT file and send mailsss

    i separated your two codes as well...i didnt quite understand what you were doing

    so i hope i separated it correctly

    assumed you wanted to check to make sure c was [email protected] format
    B and A were not formulas

    i created a pretty lame OFT file to check it worked and it did....remember it is case sensitive
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: fetch data from excel and paste in .OFT file and send mailsss

    Hi Hum,

    Awesome job done.... thank you very much...

    i added some more data fields and tried by modifying code and it works.

    I want to go a step further, the OFT file i created has company logo in it... so i want the outlook to generate it with thw image and pull the data from excel and generate mail. but the macro creating mails with out the image...why is that?

    I also tried saving my template in .rtf rich text format, now the image is showing in the generated mail but below the signature of the mail, but not in where i placed it....

    Do you have any idea on achieving the macro with image embeded .OFT file.... please help....

    i have attached the excel, but npt able to attach .OFT file...

    i also pasted below the modified macro codes for pulling more data fields, please correct me if any mistake i have done while manupulating....

    Thanks...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: fetch data from excel and paste in .OFT file and send mailsss

    did some research
    oft/template does not readily lend itself to having images

    have you thought about using the HTML method instead?
    http://vba-useful.blogspot.com.au/20...ed-images.html

  6. #6
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: fetch data from excel and paste in .OFT file and send mailsss

    Hi Hum,...

    Thanks a ton... i appreciate your kindness and helping manner....

    I had gone through the link and it helped me in adding the image in VBA mail macro. but am not able to intersect both the above macro you gave and the image link codes... I tried, it was working but if image comes, data fields are not replaced and if data field are replaced, image s not show up.

    Sorry for adding more requirements in this thread.... Can i solve this thread ( My actual initial requirement was fulfilled) and post my further requirement as a new thread.... or can i continue here....

    if so i will provide the sample i hav tried.... Thansk again...

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: fetch data from excel and paste in .OFT file and send mailsss

    please provide sample of where your up to

    the thing you need to change in html is the syntax

  8. #8
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: fetch data from excel and paste in .OFT file and send mailsss

    humdingaling,

    I worked it and found the mistakes i done.... Finally i got the macro working perfectly. Thanks a lot....

    I Will come back to you... If i need anymore suggestions or advise in macro.

    Now solving the post.

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: fetch data from excel and paste in .OFT file and send mailsss

    well done
    always good to work it out yourself so you amend it in the future if you require

    you know where to find me
    Cheers
    hum

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Fetch the data from an UI and paste it in a seperate sheet
    By Naman555 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2013, 06:47 AM
  2. fetch data in a excel file from another excel file
    By elite7 in forum Excel General
    Replies: 1
    Last Post: 12-19-2012, 02:08 PM
  3. [SOLVED] Interesting, but how to fetch data from another Excel file?
    By BNCOXUK in forum Excel General
    Replies: 2
    Last Post: 11-29-2012, 05:51 AM
  4. Replies: 0
    Last Post: 03-29-2012, 08:06 AM
  5. Use of Indirect function to fetch data from another Excel file
    By Boon8888 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-20-2006, 03:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1