If an endoscopy doesn't work, an angiography may be used to inject medicine or other materials. This may control some types of bleeding. Surgery or other treatments may be needed to stop the bleeding.