+ Reply to Thread
Results 1 to 2 of 2

Need vba help to run on active sheet, offset function, insert spacing, signature & email

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007/2010/365
    Posts
    82

    Need vba help to run on active sheet, offset function, insert spacing, signature & email

    Dear vba experts,

    I managed to make a vba worked in a single sheet environment to send email automatically but it cannot work on an active worksheet when there are multiple worksheets. (prompt OutLookMailItem.Send error in this line)

    I need to use offset command as the number of rows is not fixed for every month but don't know how to change this. The data will be filtered by date but the test vba sends email to all records, even if it's not the wanted data (meaning excluded from the wanted information using the filtering of the dates)

    On the other hand, I want to arrange the body text with line spacing and it can only work on the first line with this code vbCrLf.

    How to send emails with Outlook that has more than 1 email and set a default email with Signature (which already programmed in Outlook but could not work in the vba).

    I need the data to looks like this in the email body:


    Dear ABC Company, Andy,
    The following is due for renewal:
    YN2038J , expiring on 31 Aug 2016.
    Please renew before due date.


    Hoped that someone can helps.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by ec4excel; 08-25-2016 at 11:56 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Need vba help to run on active sheet, offset function, insert spacing, signature & ema

    The code looks like it will work just fine and will run on whatever the active worksheet is.

    Do you wish to specify a sheet and have it run against that sheet no matter where you are in the workbook?

    if so then do this with the code
    Please Login or Register  to view this content.
    You might also want to throw in some code to find the real last row number instead of hard coding it to 20.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. How to insert signature in email using .HTMLbody
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-01-2015, 06:28 AM
  2. Insert body of email above signature in Lotus Notes
    By ladislav Jakl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-16-2015, 04:52 PM
  3. Insert Lotus Notes Signature In Body Of Email Excel VBA
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-06-2013, 02:57 PM
  4. Insert scanned signature into protected sheet
    By usaexcel789 in forum Excel General
    Replies: 1
    Last Post: 05-01-2013, 11:44 PM
  5. send selected range in email with default outlook email signature included
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 10:50 PM
  6. Replies: 4
    Last Post: 02-27-2012, 03:13 AM
  7. Email using Excel VBA and Keeping Outlook Signature on the Email
    By Shama in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2009, 07:39 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