Automatically replace app after opening APK If I download an APK and open it, I get a "Not Installed" error if the app is already present on the device. Is there any way to automatically delete the old version?

(Note I'm not trying to avoid opening the APK, which isn't allowed for security reasons. I'm just trying to avoid manually deleting the old app.)
As eldarerathis already pointed out in his comment on your question: If the app is already installed, and the certificate matches, you will be prompted whether you want to replace it. If the certificates differ, there's a conflict: The app cannot be updated due to the mismatch, and it cannot be installed along as the package name is already in use (apps use an internal package name, which e.g. is shown in the URL on its Google Play Store webpage). If the package is corrupted, you again get another specific error (telling you it is corrupted).

So most probably, the .apk you try to install manually has been tampered with. If it wasn't you doing so, I would refrain from using it. If it was you, and you know what you are doing -- or you know the source to be trustworthy (e.g. the developer of the app provided you with an unsigned testing version), you have to first uninstall the original app before installing the "tainted" .apk.