+ Reply to Thread
Results 1 to 7 of 7

Problems with For Next Loop in Outlook

  1. #1
    Registered User
    Join Date
    05-15-2015
    Location
    New Orleans, Louisiana
    MS-Off Ver
    Office 2007
    Posts
    5

    Question Problems with For Next Loop in Outlook

    Essentially I am trying to make a macro that will format a table; with number of rows being user input each time the macro is run. All the information I seem to find is relating to excel
    Here is a prototype version so I can work out the syntax before I implement it into the bigger code.
    The way I expect this prototype to behave is by outputting "Hello World." 8 times in addition to the already formatted body text.
    Right now it outputs my body text followed by my signature, followed my "Hello World." one time.
    Please Login or Register  to view this content.
    Could you help me get my syntax right here?

    Thank you so much.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Problems with For Next Loop in Outlook

    Hello chaseclark24

    Outlook has two email body types: Body (ANSI String) and HTMLBody (HTML code). To add a new line to the HTMLBody you must use the new line HTML tag <BR> .

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-15-2015
    Location
    New Orleans, Louisiana
    MS-Off Ver
    Office 2007
    Posts
    5

    Re: Problems with For Next Loop in Outlook

    Thanks for the prompt response! Unfortunately this only creates a new line under the singular Hello World. I have attached a picture to better explain my output Capture.JPG

    Just to reiterate I'm hoping to see 8 Hello Worlds.

    Thanks again for you time!

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Problems with For Next Loop in Outlook

    Hello chaseclark24

    Try this...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-15-2015
    Location
    New Orleans, Louisiana
    MS-Off Ver
    Office 2007
    Posts
    5

    Re: Problems with For Next Loop in Outlook

    That worked. Thank you so much, Leigh!

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Problems with For Next Loop in Outlook

    Hello chaseclark24,

    You're welcome.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Problems with For Next Loop in Outlook

    Hello chaseclark24,

    You're welcome.

+ 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. Windows 7 :Microsoft Outlook 2003 Problems
    By Mooseman60 in forum Microsoft Windows Help
    Replies: 1
    Last Post: 04-12-2011, 08:08 AM
  2. Problems Importing Excel to Outlook
    By Goodegg in forum Excel General
    Replies: 1
    Last Post: 02-12-2010, 03:08 PM
  3. Problems with outlook sending emails
    By L_ter in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2009, 06:54 AM
  4. Mircosoft Web Outlook having problems reading my mail
    By Ms Vickie in forum Excel General
    Replies: 0
    Last Post: 11-25-2005, 11:55 AM
  5. Microsoft Outlook Express problems
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2005, 01:00 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