Missing From entry in printed mail

When I print mail from the COM APIs, the “From” entry doesnt show up. But if I print the same mail from the GUI, it’s there. Something along the lines of (JScript)

var nsfFile = “mail.nsf”;

var session = new ActiveXObject(“Notes.NotesSession”);

var workspace = new ActiveXObject(“Notes.NotesUIWorkspace”);

var db = session.GetDatabase(“”, nsfFile);

var doclist = db.AllDocuments;

var doc = doclist.GetFirstDocument();

var uidoc = workspace.EditDocument(true, doc);

uidoc.ExpandAllSections();

uidoc.Print();

doesnt print the “From” line at the top of the mail. But if I open the same “mail.nsf” file from the GUI and print it, it does.