How does heroin abuse affect women who are pregnant?

It's the baby. Heroin affects a pregnant women the same way it affects the nonpregnant. It's the baby you should be concerned about. It will be born addicted, if it survives, and have to go through closely supervised withdrawal at a critically young age.
Lots of harm. If heroin is injected, all the infections and impurities it carries can affect both mom and baby. Chronic heroin use causes the baby to become dependent, and after delivery the baby will have a neonatal abstinence syndrome (nas) which may require many weeks, or even months to treat. It is very bad for mom, and what is bad for mom is bad for baby. If this is you, find help. Talk to your ob.