Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2008
    Location
    London
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    formating cells in tables (2003)

    If frmrelevant.Lblmatter8.Visible = True Then
    Selection.GoTo What:=wdGoToTable, Which:=wdGoToAbsolute, _
    Count:=1, Name:=""
    Selection.InsertRowsBelow NumRows:=1
    Selection.Cells(1).Range.InsertAfter frmrelevant.Lblmatter8.Caption
    Selection.Cells.VerticalAlignment = wdAlignVerticalCentre
    Selection.MoveRight Unit:=wdCell, Count:=1, Extend:=wdMove
    Selection.Cells(1).Range.InsertAfter frmrelevant.Cmbmatter8.Text
    End If

    the above code takes me to a table where some text is entered in a cell after a new row is input I need to format the first cell so that the text is italic for that cell only
    Suggestions please. Basically it produces a table with two columns the first has text from the caption of labels on a form the second has a numerical score but its just the text in the first cell that I want italic

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: formating cells in tables (2003)

    Below the line that inserts a new row, add this line:

    Selection.Cells(1).Range.Font.Italic = True

    Note: wdAlignVerticalCentre should be wdAlignVerticalCenter (VBA uses US spelling conventions).

  3. #3
    Lounger
    Join Date
    Oct 2008
    Location
    London
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formating cells in tables (2003)

    Thanks Hans
    I was putting it in slightly the wrong place

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •