Information générale
Catégorie:
COM/DCOM et OLE Automation
Hi Barbara & Tamar,
Thanks for your suggestions. However, my code worked all along. I was displaying my Word document in "Normal View" instead of "Page Layout View". Normal view wasn't displaying the headings as bold. I had visible set to true so I could view the document as it was generated and wasn't seeing the headings as bold. When your suggestions weren't working I got suspicious. Boy, do I feel like an idiot.
BTW, how do you get your code to stay formatted when posting here? I'm not that familiar with HTML tags.
>>** Add a table with two rows & nine columns
>>oTable = This.oWord.ActiveDocument.Tables.Add( This.oRange,2, 9 )
>>
>>WITH oTable
>> .Rows[1].Shading.Texture = 100 && shading on row1
>>* .Rows[1].Range.Bold = .T. && this doesn't have any affect
It definitely has an affect. So I can do it here all at once. Or I can do it as below for each cell
>>
>> ** Put heading text in and set alignment
>> .Cell[1,1].Range.ParagraphFormat.Alignment = wdAlignParagraphLeft
>> .Cell[1,1].VerticalAlignment = wdAlignVerticalCenter
>> .Cell[1,1].Range.Font.Bold = .T.
>> .Cell[1,1].Range.InsertAfter("Name")
>>ENDWITH
Thanks,
Jacci
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement