I don't think that this is possible because exporting and printing are quite different things. Maybe you could use as an alternatively the caption of the object (in excel-exports they will be removed but in html-prints they remain) by using getfieldselections() and/or getcurrentfields() - maybe with an extra variable-control which switched the visibility of those selection-output on or off.