A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to remove indent in table cell from Excel



 
 
Thread Tools Display Modes
  #1  
Old November 25th, 2009, 10:14 PM posted to microsoft.public.word.newusers
christophercbrewster via OfficeKB.com
external usenet poster
 
Posts: 143
Default How to remove indent in table cell from Excel

I copied part of an XLS spreadsheet to create a Word table. The text in many
cells is indented in the original, but I need to make these flush left within
the cell. But I can't find a place within Word where this indent is shown:
it's not in the table cell specs nor in the paragraph definition. Is there a
way to unindent?

My purpose is to do this within VBA, in case that changes the answer.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...neral/200911/1

  #2  
Old November 26th, 2009, 02:00 AM posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default How to remove indent in table cell from Excel

Dim i As Long, j As Long
With ActiveDocument.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
.Cell(i, j).LeftPadding = 0
Next j
Next i
End With


--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"christophercbrewster via OfficeKB.com" u3143@uwe wrote in message
news:9fa96d97b886a@uwe...
I copied part of an XLS spreadsheet to create a Word table. The text in
many
cells is indented in the original, but I need to make these flush left
within
the cell. But I can't find a place within Word where this indent is shown:
it's not in the table cell specs nor in the paragraph definition. Is there
a
way to unindent?

My purpose is to do this within VBA, in case that changes the answer.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...neral/200911/1


  #3  
Old November 30th, 2009, 03:27 PM posted to microsoft.public.word.newusers
christophercbrewster via OfficeKB.com
external usenet poster
 
Posts: 143
Default How to remove indent in table cell from Excel

Thanks, but that doesn't get rid of the inherited indents-- it only gets rid
of the cell padding. As I said, I was unable to get rid of the indents using
the Table Properties dialog. Something in the text from Excel carries an
indent with it, but I can't find any way that it's defined within Word. If
you make a test worksheet in Excel and use the indent button on a few cells
(use different indents in different cells to make it conspcuous), then import
it to Word, I think you'll see the effect I mean.

Doug Robbins - Word MVP wrote:
Dim i As Long, j As Long
With ActiveDocument.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
.Cell(i, j).LeftPadding = 0
Next j
Next i
End With

I copied part of an XLS spreadsheet to create a Word table. The text in
many

[quoted text clipped - 6 lines]

My purpose is to do this within VBA, in case that changes the answer.


--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...neral/200911/1

  #4  
Old November 30th, 2009, 05:05 PM posted to microsoft.public.word.newusers
christophercbrewster via OfficeKB.com
external usenet poster
 
Posts: 143
Default How to remove indent in table cell from Excel

I found the specification that applies. It's in Format Paragraph, under
Indentation: the "Special" box says "1st Line" or "Hanging". This is what
needs to be 0.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...neral/200911/1

  #5  
Old November 30th, 2009, 05:14 PM posted to microsoft.public.word.newusers
Terry Farrell
external usenet poster
 
Posts: 3,004
Default How to remove indent in table cell from Excel

Try selecting the cells and reapply the Style.

--
Terry Farrell - MSWord MVP

"christophercbrewster via OfficeKB.com" u3143@uwe wrote in message
news:9fe4bddf7ce8b@uwe...
Thanks, but that doesn't get rid of the inherited indents-- it only gets
rid
of the cell padding. As I said, I was unable to get rid of the indents
using
the Table Properties dialog. Something in the text from Excel carries an
indent with it, but I can't find any way that it's defined within Word. If
you make a test worksheet in Excel and use the indent button on a few
cells
(use different indents in different cells to make it conspcuous), then
import
it to Word, I think you'll see the effect I mean.

Doug Robbins - Word MVP wrote:
Dim i As Long, j As Long
With ActiveDocument.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
.Cell(i, j).LeftPadding = 0
Next j
Next i
End With

I copied part of an XLS spreadsheet to create a Word table. The text in
many

[quoted text clipped - 6 lines]

My purpose is to do this within VBA, in case that changes the answer.


--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...neral/200911/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 PM.


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