Email this Page
Log Support Call
Send Feedback
Print |
|||||
Creating Clickable URL Links When Publishing to WordFrom time to time, we get asked how to to avoid the repetition of URLs in the published Word output - for example, the word ouptut might look something like: This is the correct behaviour - because the anchor text (the text with the link applied to it) is a URL. Why? Because a cross reference is made up of two parts :
This means that when you apply a cross reference to a URL you will get the URL twice. To avoid the repetition you need to either:
If choosing the second option, you can then use an AfterPublish macro to turn the URL into a clickable hyperlink in the Word document. The macro would need to turn the autoformat feature on (found in Word under Format > Autoformat > Options) then remove all the checkboxes apart from the Internet and network paths with hyperlinks.
Note: This is the same method you would need to use in MS Word if you copied and pasted text containing a URL. A clickable link is not created until you have entered a space after the URL (provided you have the autoformat option enabled) or formatted the document as described above. The following macro should do the trick, or at least serve as a good starting point: Sub AfterPublish ' Turn the autoformat option on to replace internet ' and network paths with hyperlinks With Options .AutoFormatApplyHeadings = False .AutoFormatApplyLists = False .AutoFormatApplyBulletedLists = False .AutoFormatApplyOtherParas = False .AutoFormatReplaceQuotes = False .AutoFormatReplaceSymbols = False .AutoFormatReplaceOrdinals = False .AutoFormatReplaceFractions = False .AutoFormatReplacePlainTextEmphasis = False .AutoFormatReplaceHyperlinks = True .AutoFormatPreserveStyles = False .AutoFormatPlainTextWordMail = False End With Selection.Document.Kind = wdDocumentNotSpecified Selection.Range.AutoFormat End Sub Remember also that we've designed the Word output with the intention of it being a printed document, and not with the intention of it being viewed online. |
|||||
| Top of Page |
Email this Page
Log Support Call
Send Feedback
Print |
||||
|
|||||