Need advice on how to help a friend..

Ok ladies and gents... a woman that I work with, who is a very nice person, has a daughter who is pregnant. .. well, yesterday, she eent with her daughter, who is 7 months along, to the doctor and there was a problem... the babies heart is not beating. Her daughter and she, of corse, are devastated. I feel so bad, and all I want to do is help but I have no idea what to say or what to do... there really is nothing I can do or say but I can just be here I guess... my heart hurts for them..