+ Reply to Thread
Results 1 to 5 of 5

add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

  1. #1
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

    Hi all,

    I am new with VBA and have a problem to insert a longer text.
    The next problem is, when in the folder is no file, the VBA stopp.
    Could anyone help me, please?

    Kind regards,
    Thorsten

    http://speedy.sh/tcty3/VBA.docx

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

    Hi Thorsten,

    I'm not clear on what you need for your first question & it would help if your file was in Excel format so I can see what you're working with.

    For your second question, you can add an If statement that moves to the next folder where there is a file if a file isn't found in the folder.

    Can you upload an Excel file & a before & after example of what you need?

    Thanks
    Remember you are unique, like everyone else

  3. #3
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

    Hi,
    thank you for your help. I have uploaded an Excel File.
    1. I have to insert one textmodul (see my example in red) choosen from 2 templates in this VBA Code for an E-Mail. Or better to create two separate text files and insert from the different files (text1 ord text2).
    2. Normaly I have to attach a file to this E-Mail. But if there is no file in the folder, display E-Mail without attachment.
    I hope it is clear for you what I mean?
    The excel file you can find here: http://speedy.sh/DsUHu/testVBA-mail.xlsm

    Kind regards,

    Thorsten

  4. #4
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

    Hi,
    thank you for your help. I have uploaded an Excel File.
    1. I have to insert one textmodul (see my example in red) choosen from 2 templates in this VBA Code for an E-Mail. Or better to create two separate text files and insert from the different files (text1 ord text2).
    2. Normaly I have to attach a file to this E-Mail. But if there is no file in the folder, display E-Mail without attachment.
    I hope it is clear for you what I mean?
    The excel file you can find here: http://speedy.sh/DsUHu/testVBA-mail.xlsm

    Kind regards,

    Thorsten

  5. #5
    Registered User
    Join Date
    08-27-2015
    Location
    Friedberg
    MS-Off Ver
    2010
    Posts
    68

    Re: add a longer text in VBA and if no file to attach display E-Mail and don't stopp.

    Hi,
    thank you for your help. I have uploaded an Excel File.
    1. I have to insert one textmodul (see my example in red) choosen from 2 templates in this VBA Code for an E-Mail. Or better to create two separate text files and insert from the different files (text1 ord text2).
    2. Normaly I have to attach a file to this E-Mail. But if there is no file in the folder, display E-Mail without attachment.
    I hope it is clear for you what I mean?
    The excel file you can find here: http://speedy.sh/DsUHu/testVBA-mail.xlsm

    Kind regards,

    Thorsten

+ 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. Mail from Lotus Notes- Attach File
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2014, 02:56 AM
  2. [SOLVED] How to prompt user to select file to attach to an E-Mail (Excel to Outlook)
    By TheLittlePrince in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 10-14-2013, 05:33 AM
  3. click on mail address, print specific page to pdf, attach it to mail
    By Crosplit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2013, 04:54 AM
  4. [SOLVED] How to attach file and send mail automatically
    By thuydo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2013, 03:50 AM
  5. [SOLVED] attach file from folder on c:\ to outlook mail and send
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2013, 11:33 AM
  6. code to attach the draft mail in new compose mail as attachment in outlook 2010
    By priya1987 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2012, 08:38 AM
  7. Attach HTM file to Lotus Notes Mail
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2009, 10:31 AM

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