you also need to make sure you don't miss a day of insulin. Otherwise when coming back onto it, you can end up with the awful side effects again. I did that a few times.
And as ttc above me said, it sadly doesn't always prevent it. I've been on metformin since June last year (and on 3 a day since Feb this year) and I'm miscarrying my second pregnancy now.
Good luck though, I hope it makes a difference for you