Yes. Something like that.
I browsed your profile and saw that you might be interested to write your own class or package so that whenever you use your class or package, your header will automatically be loaded. I can see where you're problem is coming from. It might be that you want to lessen the time you have to type a header like the one you posted whenever you want to make an exam or something like that (which may be your school test paper template or something like that).
You have several options to do this and I list two.
1. Put in a separate file all code that you use frequently then copy and paste as needed.
2. Create a package or a class file at which you have already been given some help but I would also like to point you to the post Style/class tutorials. There is also the related question Put an image header in \documentclass{letter}.
Using option 2 and the links found in the links I have posted here, I have come up with my own document class which automates the inclusion of a school header on the first page and none on the other pages for my class exams and school memos. For your specific problem, you can have a class file with the following contents.
If you want to have the header simply to appear on the first page without messing with the header, then you can do something like:
\ProvidesClass{myclass}[2012/09/03 version 0.01 My exam class]
\NeedsTeXFormat{LaTeX2e}[1996/06/01]%
\PassOptionsToClass{\CurrentOption}{article}
\ProcessOptions \relax
\LoadClass{article}
\RequirePackage[margin=1in]{geometry}
\AtBeginDocument{
\begin{center}
\sffamily
{\Large\textbf{School Name}} {\large\textbf{Name of College}}\\
{\large Name of Department}\\
{\large Subject code, subject name}\\
{\large SY 2012-2013}
\end{center}
\noindent Name: \makebox[3in]{\hrulefill} \hfill Section: \makebox[2in]{\hrulefill}\\
}
\endinput
If you want to want to use the top margin to save some space, then you can do something like:
\ProvidesClass{myclass}[2012/09/03 version 0.01 My exam class]
\NeedsTeXFormat{LaTeX2e}[1996/06/01]%
\PassOptionsToClass{\CurrentOption}{article}
\ProcessOptions \relax
\LoadClass{article}
\RequirePackage[margin=1in]{geometry}
\RequirePackage{fancyhdr}
%% This sets the header of the first page of the letter
\fancypagestyle{firstpage}{%
\fancyhf{} % clear all six fields
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhead[C]{
\parbox[t][]{4in}{
\centering
\sffamily
{\Large\textbf{School Name}}\\
{\large\textbf{Name of College}}\\
{\large Name of Department}\\
{\large Subject code, subject name}\\
{\large SY 2012-2013}
}}
}
\fancypagestyle{followingpage}{%
\fancyhf{} % clear all six fields
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\pagestyle{followingpage} % followingpage is the default page style
\AtBeginDocument{\thispagestyle{firstpage} % the page style on the first page
\geometry{headheight=1in,headsep=0.1in}
\noindent Name: \makebox[3in]{\hrulefill} \hfill Section: \makebox[2in]{\hrulefill}\\
}
\endinput
Update: September 4. Below is an MWE for testing the classes I have posted here.
\documentclass{myclass}
\usepackage{lipsum}
\begin{document}
\lipsum[1-20]
\end{document}
Below is the output for the second class I posted. You can adjust the dimensions to suit your needs but the idea is there.
