Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2012, 05:03 AM
SCMiller SCMiller is offline How to change style of text in table? Windows Vista How to change style of text in table? Office 2007
Novice
How to change style of text in table?
 
Join Date: Apr 2011
Posts: 4
SCMiller is on a distinguished road
Default How to change style of text in table?

Code:
Sub CreatDoc()
    Dim newDoc As Document
    Dim rg As Range
    
    Set newDoc = Documents.Add
    Set rg = ActiveDocument.Range(Start:=0, End:=0)
    newDoc.Tables.Add Range:=rg, NumRows:=1, NumColumns:=1
    With newDoc.Tables(1).Cell(1, 1)
        .Range.Text = "Hi!"
        'How do I change the style of the text in table 1 cell(1,1)?
    End With
End Sub

Reply With Quote
  #2  
Old 04-24-2012, 08:31 AM
SCMiller SCMiller is offline How to change style of text in table? Windows Vista How to change style of text in table? Office 2007
Novice
How to change style of text in table?
 
Join Date: Apr 2011
Posts: 4
SCMiller is on a distinguished road
Default

I figured it out. All I needed to add was:

Code:
.Range.Style = "Diagram"
My problem was that I added this style to the document I was working from, but it was not added to the Normal.dotc and so the new document didn't have this style available.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change style of text in table? Change Footer style msm6165 PowerPoint 1 07-17-2011 03:40 PM
How to change style of text in table? Change style of list simultaneously icegood Word 2 07-08-2011 07:46 AM
Matching text style to drawing object style notarichman PowerPoint 0 03-07-2011 11:34 AM
How to change style of text in table? How to change font style in wordart.... licsivaraman Drawing and Graphics 2 01-24-2011 11:27 PM
Need to delete style and style text mclan Word 0 08-04-2008 12:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:51 PM.


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