Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Formatting text in specific cell

Hi everyone.
I want to use VBA to create a table in Word and format specific cells so
that the text in them is either Left, Right or Centred. I have tried using
the Cells object but get nowhere.

Anyone able to help?

Thanks
Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Formatting text in specific cell

Hi Tim.

I want to use VBA to create a table in Word


This is probably more appropriate to a Word NG, but turn on Word's macro
recorder while you perform the operation manually. This will provide you
with code which can be edited for generic application.

format specific cells so that the text in them is either Left,
Right or Centred. I have tried using the Cells object but
get nowhere.


If this question id Excel based, to left, right or centre align a cell try:

Range("A1").HorizontalAlignment = xlLeft
Range("A1").HorizontalAlignment = xlRight
Range("A1").HorizontalAlignment = xlCenter

If this is word related, return to the macro recorder for the requisite
syntax.

---
Regards,
Norman


"tim" wrote in message
...
Hi everyone.
I want to use VBA to create a table in Word and format specific cells so
that the text in them is either Left, Right or Centred. I have tried using
the Cells object but get nowhere.

Anyone able to help?

Thanks
Tim



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text specific using conditional formatting Sherry Excel Discussion (Misc queries) 2 April 27th 09 11:10 PM
formatting specific cell KristyLynn30 New Users to Excel 3 November 21st 08 10:46 PM
formatting text on chart for specific values satraver Charts and Charting in Excel 1 January 17th 06 10:06 PM
Converting Text files to Excel sheets with specific formatting BamaBrad Excel Programming 4 September 21st 05 08:36 PM
conditional formatting on specific text in cells kwkhoo Excel Discussion (Misc queries) 3 June 21st 05 04:27 PM


All times are GMT +1. The time now is 11:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"