If a person develops herpes, the doctor will treat it with an antiviral medicine given intravenously or orally to shorten the outbreak. The antiviral medications can treat both types of herpes simplex, including famciclovir and acyclovir.