+ Reply to Thread
Results 1 to 7 of 7

Insert Current month into body of email

  1. #1
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Insert Current month into body of email

    Hi everyone

    I am currently using a VBA from Ron de Bruin to send a worksheet via email, which is working fine. However, if I can I want to add the current month (when the email is sent) to the body of the email. Below is the code I have, and where it says [MONTH] that's where I need the month to go. I have tried "Please find attached " & Format(Now, "mmm-yy") "rest of message....."

    but this didn't work. Had an error saying expected end of line or something like that. Any help will be greatly appreciated!

    Please Login or Register  to view this content.
    Last edited by Fotis1991; 09-13-2013 at 07:50 AM. Reason: added code tags

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Insert Current month into body of email

    Welcome to the forum

    Pls

    Use code tags around code.

    Posting code between
    Please Login or Register  to view this content.
    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here


    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Re: Insert Current month into body of email

    Many thanks - apologies, I registered originally a while ago but first post, will go an re-familiarise myself with the guides and rules again. Many thanks

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Insert Current month into body of email

    That's why we are here! To show the correct road!

    Your understabding is much appreciated!

    Good luck with your thread!

  5. #5
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Re: Insert Current month into body of email

    I've actually managed to solve this problem, and thought would post in-case someone else has similar issue.

    The problem was I was typing

    Please Login or Register  to view this content.
    Where as I should have been typing

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Insert Current month into body of email

    That's great. We thank you for posting the solution as maybe will helps someone else as you said.

    So in this case, pls.

    Please mark your Thread as SOLVED. Select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

  7. #7
    Forum Contributor
    Join Date
    10-12-2012
    Location
    Bournemouth
    MS-Off Ver
    Excel 2010 / Excel 2007
    Posts
    126

    Re: Insert Current month into body of email

    Done =) Thanks for your assistance

    Quote Originally Posted by Fotis1991 View Post
    That's great. We thank you for posting the solution as maybe will helps someone else as you said.

    So in this case, pls.

    Please mark your Thread as SOLVED. Select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

+ 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. Creating code to publish pdf and attach via xl2010 and insert object in body of same email
    By ChrisBrennan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2013, 09:08 PM
  2. How to insert table or form wth worksheet data in email body
    By Antee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2013, 05:54 PM
  3. [SOLVED] Auto insert current month's name and current year
    By Webtekr in forum Word Formatting & General
    Replies: 0
    Last Post: 03-03-2009, 05:20 AM
  4. Help me insert a table of data into a body of an email
    By funkymonkUK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2006, 08:20 AM
  5. Insert Hyperlink in body of email
    By MAYDAY in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-04-2005, 12:15 PM

Tags for this Thread

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