One important thing to note:
I ran into a problem with sharepoint when using the above solution, and it dealt with my custom Edit Task form. As I had stated earlier, the task form has a link to a document the users need to fill out and save. This is the only place where they'll have the link to the document. The problem I ran into when using this solution is that when I would click on the link to open the document, it would navigate away from the Edit Task form, to the OpenDocForEdit.aspx page, which in turn would open the word document. The problem with this was that when the user would fill out the form, save it, and close it, they couldn't find the Edit Task form. In order to get back to it, they needed to click Back on their browser. As a short term fix, I could just instruct them to do so, but it wasn't a nice solution, since I would prefer to take all needed user actions out of the equation, and have as much automated as possible.
My first attempt at a solution:
I tried changing the html for the link to have a target="_blank" and then use the OpenDocForEdit.aspx page parameter ?close=true. My thinking was that if it opened in a whole new window, and that window would auto-close, it would be perfect! This did not work though. It would close the window from the parameter close=true, but the target="_blank" was not working. My first thought, and worry, was that Sharepoint was stripping out the code.
The solution:
I found out that Sharepoint was not stripping out the code for security reasons, but the column that I was storing the html code in was a multi-line Rich Text column, and IT was responsible for the link not working. It was seeing the actual URL in my html tag of <a href=... etc. and making it into a link. The other part of the html tag (target="_blank") was being ignored. So, when the form was using the link, it was never seeing the additional code. After switching the column to Enriched Text, it now works great! I can follow the link in the email notification to the Edit Task form, click on the link to the document, and it opens in a new IE window, and closes automatically.
Also important is to use all lower case in your html! I tried ?Close=true, and it did not work. However, ?close=true does.
Thanks!
Paul