For OpenOffice, there is
eScape (I don't know how "automatic" it is, though).
For LaTeX, I don't think there is an all-in-one solution. There are a couple of TeX->HTML solutions whose name I don't remember exactly (t4h? tex2html?), which may be a starting point.