Kad
March 25, 2004, 18:12:07
When I use this code:
Head2_TableID = 13
tx.SelStart = -1
tx.TableInsert 3, 2, -1, Head2_TableID
tx.TableCellText(Head2_TableID,1,1) = "Centre : " & infoCentre
a TX internal error occurs. (at the last line of code)
please tell me what to do
Björn Meyer
March 26, 2004, 12:51:20
Which exact error message do you get?
Kad
March 29, 2004, 09:48:46
the error is:
Tx4ole error '800a4e28'
Erreur interne à Text Control.
Where can I find error codes description ?
I use this part of code:
the red line is the line which cause the error
Response.Buffer = True
set lc = Server.CreateObject("TX.TextControl.LicManager")
set tx = Server.CreateObject("TX.TextControl.110")
tx.EnableAutomationServer
tx.ViewMode = 1
' Format A4 avec 1cm de marge
tx.PageHeight = 11906
tx.PageWidth = 16837
tx.PageMarginL = 567
tx.PageMarginB = 567
tx.PageMarginT = 567
tx.PageMarginR = 567
' Police par défaut du document
tx.FormatSelection = false ' false = tout le document
tx.FontSize = 8
tx.FontName = "Arial"
tx.HeaderFooter = txHeader + txMainText + txFooter
' Définition de l'entete
tx.HeaderFooterSelect txHeader
' Entete / Largeur de colonnes
Head_col1 = 480
Head_col2 = tx.PageWidth - tx.PageMarginL - tx.PageMarginR - Head_Col1
' Entete / Cree le tableau
tx.SelStart=-1
Head_TableID = 11
tx.TableInsert 1, 2, -1, Head_TableID
' Entete / (2 colonnes)
tx.TableCellAttribute(Head_TableID, 1, 1, txTableCellHorizontalExt) = Head_col1
tx.TableCellAttribute(Head_TableID, 1, 1, txTableCellBorderWidth ) = 10
tx.TableCellAttribute(Head_TableID, 1, 2, txTableCellHorizontalExt) = Head_col2
tx.TableCellAttribute(Head_TableID, 1, 2, txTableCellBorderWidth ) = 10
tx.TableCellAttribute(Head_TableID, 1, 2, txTableCellBackColor) = RGB(255,250,220)
tx.TableCellAttribute(Head_TableID, 1, 2, txTableCellVertAlign ) = 1
' Ajout logo
tx.FormatSelection = true
tx.SelStart = tx.TableCellStart (Head_TableID,1,1) - 1
tx.ObjectInsertAsChar 0, Server.MapPath("afpa.png"), tx.TableCellStart(Head_TableID, 1 ,1)-1, 20,20, 0, 1
' Ajout titre document
tx.SelStart = tx.TableCellStart (Head_TableID,1,2) -1
tx.Alignment = 2
tx.FontSize = 12
tx.SelText = "Planning prévisionnel d'activité de " & infoBenef
Head2_TableID = 13
tx.SelStart = -1
tx.TableInsert 3, 2, -1, Head2_TableID
tx.TableCellText(Head2_TableID,1,1) = "Centre : " & infoCentre
tx.SelStart = tx.TableCellStart (Head2_TableID,1,1) -1
tx.SelLength = tx.TableCellLength (Head2_TableID,1,1)
tx.FontSize = 10
tx.SelText = "Planning prévisionnel d'activité de " & infoBenef
' Fin de l'entete
tx.HeaderFooterSelect 0