I am currently on Effexor and have been wondering the same thing. From the research I've done, it would seem that taking it IS NOT harmful. Actually, the extreme stress and mental/emotional strain of Effexor withdrawal and going without it for months can actually be MORE harmful for the well-being of the baby than if you stayed on.
An option, if you are worried, is to slowly reduce your dosage (with the help of your doctor!) throughout your pregnancy, ending up on a minimal/no dose by the time you deliver. That way, the baby will not go through any withdrawal from the medication once it is born.
Taking Effexor during breastfeeding doesn't seem to be a problem, as only minimal traces of the medicine actually make it into the breast milk.