I had miscarriage and d&c 2weeks ago. When is it safe to just have sex again? And when can I try to have baby?

Any time. As long as. If you are not having excessive pain, bleeding/discharge etc. Should be ok for relations...About getting pregant. Any time from here onward as long as you are feeling well. Take your prenatal vitamins regular if planning for pregnancy. I am sorry about your miscarriage. Best of luck to you...