Based on the answer I received to Print a short title in the header, I've created the macro \handoutheader in a .sty file I use as the template for my conference presentations.
\newcommand\@confname{} % create macro for name of conference
\newcommand\confname[1]{\renewcommand\@confname{#1}}
\newcommand\@confplace{} % create macro for place of conference
\newcommand\confplace[1]{\renewcommand\@confplace{#1}}
\newcommand\@confdate{} % create macro for date of conference
\newcommand\confdate[1]{\renewcommand\@confdate{#1}}
\newcommand{\handoutheader}{%
My name \hfill \@confname\\
My affiliation \hfill \@confplace\\
My e-mail address \hfill \@confdate\\} % make handout header
\AtBeginDocument{\setlength{\parindent}{0pt}\handoutheader}
The logic is that I specify in the preamble of the .tex file for the handout what the name, place, and date of the conference is, and then the template creates a header on the handout with that information.
Now, I'd like to print the date of my presentation in the handout text. How do I do that? I've tried \confdate and \@confdate, but neither works.
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{mystyle.sty}
%% My package starts here
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mystyle}
\newcommand\@confname{} % create macro for name of conference
\newcommand\confname[1]{\renewcommand\@confname{#1}}
\newcommand\@confplace{} % create macro for place of conference
\newcommand\confplace[1]{\renewcommand\@confplace{#1}}
\newcommand\@confdate{} % create macro for date of conference
\newcommand\confdate[1]{\renewcommand\@confdate{#1}}
\newcommand{\handoutheader}{%
My name \hfill \@confname\\
My affiliation \hfill \@confplace\\
My e-mail address \hfill \@confdate\\} % make handout header
\AtBeginDocument{\setlength{\parindent}{0pt}\handoutheader}
\endinput
%% And ends here
\end{filecontents}
\usepackage{mystyle}
\confname{Name of conference}
\confplace{Place of conference}
\confdate{Date of conference}
\begin{document}
\vspace{2ex}\\
After hearing my talk, you will remember the date \confdate\ for the rest of your life.\\
After hearing my talk, you will remember the date \@confdate\ for the rest of your life.\\
\end{document}



\makeatletterin the document text? I generally prefer to keep those in preambles and package files. EDIT: Never mind, I'm happy with\makeatletter\@confdate\makeatletter. – Sverre Oct 07 '14 at 17:15