Do I need a comma when addressing someone in writing?

When I'm addressing someone in writing, such as on a forum or other public space, will I need a comma(s) before/after/surrounding their name?

For example:

Thanks for that information Greg we're here to help.


Solution 1:

According to the Chicago Manual of Style’s FAQ on commas, a comma should be used before a name, title or term of endearment when that person is directly addressed:

[I]n formal writing, direct address takes a comma before the person’s name. One could argue, however, that e-mails aren’t formal, and that there’s little harm in streamlining for the sake of efficiency

If the name is not the last word in the sentence then a comma should follow it also.

Thus, if your example was retained as a single sentence it would be:

Thanks for that information, Greg, we're here to help.

Having said that, this would read more smoothly if expressed as two sentences:

Thanks for that information, Greg. We're here to help.