Ramipril is also used in some patients with heart failure after a heart attack. After a heart attack, some of the heart muscles weaken and become damaged. These heart muscles may continue to weaken as time goes by. This makes it more difficult for the heart to pump blood. Ramipril may be started within the first few days after a heart attack to increase the survival rate.