Ha, ha, ha! That’s a good joke!
O used as a vocative or to express a desire or imprecation does not call for an exclamation.
O John.
Oh, yes.
O, that night would come!
The exclamation is sometimes used in job printing to fill out a display line or for other inadequate reasons. These uses should be avoided.
THE APOSTROPHE
The apostrophe is primarily the sign of the possessive case, but it has several other uses.