Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-09-2012, 05:05 PM
macropod's Avatar
macropod macropod is offline How to I make text Bold in a User Form -Visual Basic Windows 7 64bit How to I make text Bold in a User Form -Visual Basic Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Hi gurp,

If you want the text on the userform to appear bold, set the font attribute for that element to bold. For example:
TextBox1.Font.Bold = True

If you want the output in the document to be bolded, set a range object to the destination, populate the range, then format the range as bold. For example:
Code:
Dim Rng As Range
Set Rng = ActiveDocument.Bookmarks("SomeBookmark").Range
With Rng
  .Text = TextBox1.Text
  .Font.Bold = True
End With
ActiveDocument.Bookmarks.Add "SomeBookmark", Rng
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Visual Basic error - run time error 504 crazymorton Word 11 01-13-2012 04:32 AM
Visual Basic Editor changes from 2003 to 2007 Rockitman31 Word VBA 4 09-21-2011 12:01 PM
How to I make text Bold in a User Form -Visual Basic Basic user needs drop down menus Mabozar Word 1 01-19-2010 02:49 PM
Referencing Tables in Visual Basic Editor DavidB Word Tables 0 09-21-2009 04:01 PM
How to I make text Bold in a User Form -Visual Basic A little Visual Basic Help Please leroytrolley Excel 4 08-22-2008 03:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:35 PM.


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