te4t0n
12-03-2007, 03:47 PM
Hello, i have this code:
Dim i As Integer
For i = 1 To 800
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=5
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeText Text:=i
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Next i
Which when i have a link copied, will paste it below, delete the last two digits and then add a number on the end. Works great, But!
What i need now is to try and open a hyperlink and catch an error. you cannot use macros to record the clicking of a hyperlink so i don't knwo the code for it and how would i catch this error ("Unable to open http ... .com" Cannot locate the internet server or Proxy server) thks.
Dim i As Integer
For i = 1 To 800
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveLeft Unit:=wdCharacter, Count:=5
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeText Text:=i
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Next i
Which when i have a link copied, will paste it below, delete the last two digits and then add a number on the end. Works great, But!
What i need now is to try and open a hyperlink and catch an error. you cannot use macros to record the clicking of a hyperlink so i don't knwo the code for it and how would i catch this error ("Unable to open http ... .com" Cannot locate the internet server or Proxy server) thks.