Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word automation how to BOLD
Message
 
À
15/01/2015 08:33:48
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01613678
Message ID:
01613681
Vues:
48
>I am using wordautomation
>I own Tamars book
>
>i need to write into a table cell
>
>1st line
> font.size=10
> font.bold=.t.
>
>2nd line in same cell
> font.size=8
> font.bold=.f.
>
>how can this be done
>
>this does not work
>
>loTable.Cell[liRowNo, 1].RANGE.InsertAfter(ALLTRIM(lcname))
>loTable.Cell[liRowNo, 1].RANGE.Shading.Texture = 50
>
>loTable.Cell[liRowNo, 2].RANGE.InsertAfter(thisform.lcCurrentYear+[:  ]+ALLTRIM(lcVotes) )
>x1=loTable.Cell[liRowNo, 2].RANGE.Font.Size
>
>loTable.Cell[liRowNo, 2].RANGE.Font.Bold = .t.
>loTable.Cell[liRowNo, 2].RANGE.InsertAfter( CHR(13) )
>loTable.Cell[liRowNo, 2].RANGE.Font.Size=8
>loTable.Cell[liRowNo, 2].RANGE.InsertAfter(lcPrevYear+[: (]+lcVotesP +[)])
>loTable.Cell[liRowNo, 2].RANGE.Font.Size=x1
>loTable.Cell[liRowNo, 2].RANGE.Font.Bold =.f.
>
>
>loTable.Cell[liRowNo, 2].RANGE.ParagraphFormat.ALIGNMENT = wdAlignParagraphRight
>IF NOT EMPTY(lcPerc)
>loTable.Cell[liRowNo, 3].RANGE.InsertAfter(ALLTRIM(lcPerc) +[%] + CHR(13) +lcprevyear+[(]+ALLTRIM(lcPercP) +[%)])
>loTable.Cell[liRowNo, 3].RANGE.ParagraphFormat.ALIGNMENT = wdAlignParagraphRight
>ENDIF 
>loTable.Cell[liRowNo, 4].RANGE.InsertAfter(lcPlural + CHR(13) +thisform.lcprevyear+[(]+lcPluralP +[)])
>loTable.Cell[7, 4].RANGE.ParagraphFormat.ALIGNMENT = wdAlignParagraphRight
>
>
>what am I doing wrong
>
>Thanks for listening
>
>Peter
loTable.Cell[liRowNo, lnColumn].Select
oExcel.Selection.Font.Bold = .t.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform