I just went through this with one of my oldest friends about nine months ago. She and her husband (in their 20's) found out that their child had a serious genetic condition and that the baby would not likely survive more than a week. They elected to terminate the pregancy and it was devastating to them. In fact, she told us all in an email b/c she really wasn't ready to talk and was not prepared for the grief that we would all experience.
I went and bought a series of cards, starting with more "serious" and getting gradually more light-hearted and "thinking about you" in nature. I sent them periodically over the course of time. The notes inside were simple- thinking of you... hope your heart smiles today...you are in my thoughts, etc. People tend to pour out all of their wishes in the first month and then move on with their lives. My friend said that it reminded her that someone else was sharing her sorrow and celebrating her little victories to get regular and unexpected notes.
But to answer your specific question, remember that you can tell her that you know that her heart is breaking, but that you know you could never understsand what she is going through. My wording was something like this: "My heart breaks for you and your family. You and (your husband) have a strong marriage and I know that with the stregnth of your family you will find a way through this. Please know that my heart and thoughts are with you."
Around her due date, I sent her a plant with a simple note.