Need troubleshooting help with 3 lines of VBA code

P

padshall

This crashes Word 2007 even though it works with previous versions. Current
doc is just standing for the name of the currently active document.

Sub FollowLink()
Selection.Hyperlinks(1).Follow
Documents("current.doc").Close
End Sub

Any one got any idea why?
 
S

Shauna Kelly

Hi

It works for me. If you step through the code, on which line do you get the
error? What is the error message? And where is the insertion point when you
begin to run the code?

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top