JohnnyBravo
08-20-2013, 02:26 PM
I've got a simple word document. Dealing with MS Office 2010. All i want to do is make automatic hyperlinks:
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
When I hit the return key at the end of each line, MS Word automatically makes the URL a hyperlink that the user can click on. This is exactly what I want. However, I have hundreds of these lines and it would be a complete PITA to go through each 200-300 lines and hit return. So I recorded a macro.
I get this:
10479
Here is the VBA code:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
End Sub
I don't know enough about VBA to modify this routine so that the desired result is:
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
Any help would be greatly appreciated.
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
www.something.com/1 (http://www.something.com/1)
When I hit the return key at the end of each line, MS Word automatically makes the URL a hyperlink that the user can click on. This is exactly what I want. However, I have hundreds of these lines and it would be a complete PITA to go through each 200-300 lines and hit return. So I recorded a macro.
I get this:
10479
Here is the VBA code:
Sub Macro1()
'
' Macro1 Macro
'
'
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.TypeParagraph
End Sub
I don't know enough about VBA to modify this routine so that the desired result is:
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
http://www.something.com/1
Any help would be greatly appreciated.