Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 10-30-2014, 11:43 PM
macropod's Avatar
macropod macropod is offline Help with display text for URLs in template Windows 7 64bit Help with display text for URLs in template Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,523
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It works for me, with character and paragraph Styles alike. Indeed, you could even simplify the line to:
.Style = "DB_Content"

Do note that, apart from any paragraph-level attributes applied by your Style (e.g. alignment, space before/after, font name & size), hyperlinks have their own character Styles (basically, blue underlined text), so those will take precedence over your Style. You can, of course, re-apply the Style's font attributes such as bold & italics to the paragraph, so as to re-format the hyperlinks, after applying the Style, using code like:
Code:
  With .Paragraphs(1).Range.Font
    .Bold = ActiveDocument.Styles("DB_Content").Font.Bold
    .Italic = ActiveDocument.Styles("DB_Content").Font.Italic
  End With
before the 'End With'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with display text for URLs in template Not press F9 to refresh URLs? ASW122 Mail Merge 5 07-14-2014 09:35 PM
How do MS Office products link to URLs? stegraham Office 2 10-22-2013 04:52 AM
Help with display text for URLs in template URLs in citations acappella Word 3 07-24-2012 03:28 PM
Template does not display in Installed Templates JimH Word 1 02-01-2012 11:59 AM
mailmerge with custom URLs? guthrie Mail Merge 0 03-06-2011 08:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft