PDA

View Full Version : Returning from a Hyperlink (from Word)



MWE
04-08-2006, 08:38 AM
I have noticed that when I hyperlink out of Word using the FollowHyperlink method, I get an unusual result when I click on the BackArrow in the target file to return to the parent doc. I would expect to just return to the parent doc. But it appears that when I return to the parent doc, any code in the parent doc's ThisDocument module executes. Is this supposed to happen?

fumei
04-08-2006, 07:23 PM
ANY code in ThisDocument? ALL code in ThisDocument?

fumei
04-08-2006, 07:27 PM
I can not duplicate this. Could you give more info? is the target file a Word doc? A web page?

MWE
04-09-2006, 12:45 PM
ANY code in ThisDocument? ALL code in ThisDocument? The only code in ThisDocument is the procedure that executes when the document is opened. For purposes of testing, I removed any code that was there (not much) and substituted a single MsgBox call. The Document_Open proc executes every time control returns back to the parent Word document.
Private Sub Document_Open()
MsgBox "Document_Open test"
End SubI have tried this with several different documents and it happens with every one of them.

MWE
04-09-2006, 12:47 PM
I can not duplicate this. Could you give more info? is the target file a Word doc? A web page?The target document for the hyperlink is a Word document (the only examples I have tested). I will try it with a few other types and post back.

This may be yet another problem with my version of Word/VBA. I do not have these problems with Excel or Project.

fumei
04-09-2006, 02:23 PM
Hmmmm. I am still not getting this behaviour.