\documentclass[11pt,letterpaper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{txfonts}
\usepackage[raggedright,bf,sf]{titlesec}
\usepackage{blindtext}
\parindent0em
% ----- Change format of subsection to be slanted, bold, sans serif -----
%\titleformat*{command}{format}
%\titleformat*{\subsection}{\sl} % attempt 1 ... gives sl but back in serif
%\titleformat*{\subsection}{\sf,\bf,\sl} % attempt 2 ... gives error
% --- try the non-* format command ---
%\titleformat{command}[shape]{format}{label}{sep}{before}[after]
%\titleformat{\subsection}[\sl]{} % attempt 3 ... gives error
%\titleformat{\subsection}[sl]{} % attempt 4 ... gives error
% ----- Change spacing above and below the headings -----
%\titlespacing*{command}{left}{beforesep}{aftersep}[right]
\titlespacing*{\section}{0pt}{6pt}{3pt}
\titlespacing*{\subsection}{0pt}{6pt}{6pt}
% ----- Change fontsizes of headings -----
% need to change \section to 14pt
% need to change \subsection to 12pt
\begin{document}
· \Blinddocument
\end{document}