# Extra code in the beginning of all frames

I want to add at the beginning of all beamer frame environments some extra commands (for example, \vspace{-0.5cm}) and my trial with

\addtobeamertemplate{frame begin}{}{\vspace{-0.5cm}}


doesn't work at all.

Which line should I add to solve this problem?

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Jun 19 '14 at 15:44

\documentclass{beamer}