A long, long, time ago, I can still remember how much I hated trying to get all the damned <'s and >'s in the right spots, and make sure all the text of my titles were correctly inside to make an embedded hyperlink. I screwed it up half the time, so I decided there must be a better way. And there is.
I'm a legal secretary, and a damned good one. I've learned many tricks in Word to make life easier.
Like a bit of code in a macro, and the use of pop-up boxes, for generating automatic hyperlinks.
If you're interested, detailed instructions are below the fold.
Create a new document and name it... whatever you want to name it. Let's say "hyperlink". And let's assume that you place it in the default "My Documents" folder. You need to know this, because you'll need the entire, complete, full pathname later on. So, if you're using Windows XP, the full document name would be something like c:\Documents and Settings\Frankenoid\My Documents\hyperlink.doc.
So you can see what you are doing, check the Field Codes box in your Word View Options (Tools:Options). Mark the option so that field codes are "always shaded".
Create two bookmarks (Insert:Bookmark). Name one "Link", the other "Title".
Then put in a couple of blank lines.
In the following instructions, be sure to put quotation marks where ever indicated - it's part of the coding.
Insert an empty field codes (ctrl:F9), and paste the following into it: ASK Link "Link"\o. Insert a second empty field code (ctrl:F9) and paste the following into it: ASK Title "Title"\o
Put in a couple of blank lines
Paste the following text into your document: <A TARGET="_blank" HREF=". After the last quotation mark, put in an empty field code (ctrl:F9), and paste the following into it: REF Link. Paste the following into your document: ">, right after the field code. Then put in another field code, and paste the following into it: REF Title. Directly after that field code, paste the following: </A>.
Do not put any extra spaces or blank lines in the above
Go to the beginning of the line which starts <A TARGET=, and mark the whole line. While it is marked, create a bookmark (Insert:Bookmark), and name it "Copy" -- your line of code will be encased in the bookmark.
Now you are going to create a macro. Go to Tools:Macro. In the box on the top, type "AutoOpen". MAKE SURE YOU GO DOWN TO THE "Macros In" drop down box, and use the drop down box to specify the DOCUMENT YOU ARE IN (otherwise, you'll have hell to pay the next time you try to open a Word document, triggering a macro stored in your global "Normal.dot" template which will automatically try to run a macro that it can't find the bookmarks for. Should you make such a grievous error, you can avoid triggering an "AutoOpen" macro by holding the "Shift" key when you open the hypothetical "hyperlink.doc", then erase the macro and start all over again, storing it in the right place the next time).
Select "Create", and paste the following code in it, above the "End Sub":
Documents("c:\Documents and Settings\Frankenoid\My Documents\hyperlink.doc").Activate
Selection.WholeStory
Selection.Fields.Update
Selection.MoveLeft Unit:wdCharacter, Count:=1
Selection.GoTo What:=wdGoToBookmark, Name:
"Copy"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Copy
Selection.HomeKey Unit:=wdStory
If Documents.Count > 1 Then
ActiveWindow.Close SaveChanges:=wdDoNotSaveChanges
Else
Application.Quit SaveChanges:=wdDoNotSaveChanges
End If
Where it says c:\Documents and Settings\Frankenoid\My Documents\hyperlink.doc -- insert the full path name of your document, making sure to get it in between the quotation marks. If you don't know the full pathname, go to Windows Explorer, find the document, right-click and select "properties", and you can get the full path there.
Save the document. The next time you want to create a hyperlink, go to the web page you want, and copy the URL. Open your document, and it will automatically open a box into which you paste the URL, and click OK. It will then open a second box, into which you type the title you want to give your link, and click OK. It will then automatically generate the code for the hyperlink, copy it, and close the hyperlink.doc document. You can just paste the code into your diary/comment.
I have a short cut to my hyperlink.doc in my task bar, so I can just click on it and quickly create a working hyperlink every time.
I hope I've explained this clearly -- and hope I've captured all the places where dKos auto-formatting would defeat me. I haven't even asked Mr. Frankenoid to test-drive my instructions, so I'm not too sure how good they are. I'm a whiz at Word... not at writing instructions manuals.
Remember, if something doesn't work, hold down the shift key when opening the document, and it will over-ride the AutoOpen macro.
Good luck.