Boldare si centrare in tabel

Informatii despre cum se utilizeaza Microsoft Word 2003. Editare, formatare, automatizare de documente
Închis
Apostolu
Mesaje: 285
Membru din: Joi Aug 20, 2009 4:05 pm

Boldare si centrare in tabel

Mesaj de Apostolu » Joi Oct 10, 2013 6:32 pm

Document cu multe tabele.

Se cere bolarea si centrarea textului din primul rand al tuturor tabelelor.

Cum se poate face automat ?

IPP
Moderator
Moderator
Mesaje: 4196
Membru din: Mie Iul 29, 2009 7:26 am
Localitate: Cluj-Napoca

Re: Boldare si centrare in tabel

Mesaj de IPP » Vin Oct 11, 2013 4:33 pm

Buna ziua

Pe o copie a fisierului dvs. original, testati codul:

Cod: Selectaţi tot

Sub ChngFormatR1InTbls()

'IPP - 11.10.2013

Application.ScreenUpdating = False

Dim tTable As Table
      
For Each tTable In ActiveDocument.Tables
    tTable.Rows(1).Select
        With Selection
        .Font.Bold = wdToggle
        .ParagraphFormat.Alignment = wdAlignParagraphCenter
        End With
Next

Application.ScreenUpdating = True

End Sub
IP
Nu aveţi permisiunea de a vizualiza fişierele ataşate acestui mesaj.

Apostolu
Mesaje: 285
Membru din: Joi Aug 20, 2009 4:05 pm

Re: Boldare si centrare in tabel

Mesaj de Apostolu » Vin Oct 11, 2013 5:03 pm

Pe niste table facute repede intr-un doc, a functionat perfect.
Sa vad zilele astea si pe ceva exemple reale.

Oricum multumesc foarte mult !

Închis

Înapoi la “Intrebari despre Word 2003”