Re: Formating first line of every cells in first column of word ta

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I would suggest that you use separate rows for the headings and apply different paragraph styles to the heading and body rows.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Sunil Pradhan" <SunilPradhan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:0D5BFB93-088C-46C1-8878-FB810EFE646A@xxxxxxxxxxxxxxxx
I want to have first line of each cells in first column of table in different
format (font type, size) etc. each cells have 1st line as heading and other
lines as body. I can send you an sample if i get your email address. I am
trying to write macro in word for the first time & unable to understand. I
am used to in writing macros in excel.
thx


"Graham Mayor" wrote:

What do you mean by 'format'?
What do you mean by 'convert'
What do you mean by 'first line'?

The following macro will locate the content of the first cell of each row in
turn and assign it to a range variable. You can then process that range to
do what you wish.

Dim oRng As Range
With ActiveDocument.Tables(1)
For i = 1 To .Rows.Count
Set oRng = .Rows(i).Cells(1).Range
oRng.End = oRng.End - 1
'orng is the content of the first cell of the row
Next i
End With


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>




Sunil Pradhan wrote:
> Trying to write a macro which can convert first line of every cells
> in first column of word table. pls help





.



Relevant Pages

  • Re: LISTNUM & Wildcards
    ... "Jay Freedman" wrote: ... That's what the macro looks for. ... are the heading numbers just ordinary typed ... Listnum), try to translate those three characters to a number (which ...
    (microsoft.public.word.docmanagement)
  • Re: LISTNUM & Wildcards
    ... That's what the macro looks for. ... are the heading numbers just ordinary typed ... Listnum), try to translate those three characters to a number (which ... "Jay Freedman" wrote: ...
    (microsoft.public.word.docmanagement)
  • Re: LISTNUM & Wildcards
    ... I loaded the macro and ran it; ... Is the reason it didn't work is you say < 4 but my heading is 4.0? ... "Jay Freedman" wrote: ... For each Listnum \l 2 it finds, it needs to examine the value ...
    (microsoft.public.word.docmanagement)
  • Re: Styles help
    ... Heading 0 style. ... This revision to the macro will avoid that error by changing the number from ... 'Apply List Format To Selection ... I other procedures have the same pattern. ...
    (microsoft.public.word.vba.general)
  • Re: Styles help
    ... Your other 'procedures' probably have a different pattern when you reveal ... were looking for in your original macro that you posted. ... But the heading ... To provide instruction for flushing the lube oil system on RFW DT 1B and RFW ...
    (microsoft.public.word.vba.general)