1
Познакомьтесь с пентестом веб-приложений на практике в нашем новом бесплатном курсе
сто пудов пайдет.не,.. не пайдет..........
кому нужно?нужно с помощу навигатора и рейнжев............
сорри за ОФФ, ничего личного ;-), но не могу удержаца:мне нужно.... япросто уже добираюсь к ячейке с помощю навигаторов и ренжев,.......
но не знаю какими методами воспольховатся для работы с текстом.......
Set notesRTS = rtRangeCell1.Style
Set ArreyT1(i22)=notesRTS
Dim s As New NotesSession
Dim i22 As Integer
i22=1
Do '============
'брем размерность табилци
Set rtt1 = rtnav1.GetElement
'Dim RC As Integer
'Dim CC As Integer
RC%=rtt1.RowCount
CC%=rtt1.ColumnCount
n1=(CC%*(n-1))+1
Redim ArreyT1( 1 To CC%) As Variant
REM Set up range and navigator for table
Set rtRangeTable1 = prntempbody.CreateRange
Call rtRangeTable1.SetBegin(rtnav1)
Call rtRangeTable1.SetEnd(rtnav1)
Set rtNavTable1 = rtRangeTable1.Navigator
REM Find cells in table
Set rtRangeCell1 = prntempbody.CreateRange
Set rtRangePara1 = prntempbody.CreateRange
For i=n1 To n1+(CC%-1)
Call rtNavTable1.FindNthElement(RTELEM_TYPE_TABLECELL, i)
'Do Dim notesRTS As NotesRichTextStyle
REM Set up range and navigator for cell
Call rtRangeCell1.SetBegin(rtNavTable1)
Call rtRangeCell1.SetEnd(rtNavTable1)
Set rtNavCell1 = rtRangeCell1.Navigator
REM Find paragraphs in cell
Set notesRTS = rtRangeCell1.Style
Set ArreyT1(i22)=notesRTS
i22=i22+1
rtNavCell1.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
Do
Call rtRangePara1.SetBegin(rtNavCell1)
Loop While rtNavCell1.FindNextElement(RTELEM_TYPE_TEXTPARAGRAPH)
Next
Loop While rtNav1.FindNextElement(RTELEM_TYPE_TABLE)
Dim STL As Variant
Dim notesRichTextStyle As NotesRichTextStyle
Set notesRichTextStyle = rtRangePara.Style
STl=notesRichTextStyle
Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim s As New NotesSession
Dim rttableData() As String
Dim session As New NotesSession
Dim rtt As NotesRichTextTable
Dim db As NotesDatabase
Dim notesRTS As NotesRichTextStyle
Dim STILE As NotesRichTextStyle
Set db = session.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument
Dim wksp As New notesuiworkspace
Dim newdoc As notesdocument
Dim rtitemA As notesrichtextitem
Dim TableName As String
Redim ArreyT1( 1 To 10 , 1 To 25, 1 To 10) As Variant 'ЕСЛИ ЧТО, надо заменить 1до 25 на
Dim docnum As Integer
docnum=1
xx=1
cp=0 ' reset the column position
Set body = doc.GetFirstItem("prn_table")
REM Find first table in Body item
Set rtnav = body.CreateNavigator
If Not rtnav.FindFirstElement(RTELEM_TYPE_TABLE) Then
Messagebox "Body item does not contain a table,",, _
"Error"
Exit Sub
End If
Do '============
'брем размерность табилци
Set rtt = rtnav.GetElement
'Dim RC As Integer
'Dim CC As Integer
RC%=rtt.RowCount
CC%=rtt.ColumnCount
' Redim ArreyT1(1 To RC%, 1 To CC%) As String
REM Set up range and navigator for table
Set rtRangeTable = body.CreateRange
Call rtRangeTable.SetBegin(rtnav)
Call rtRangeTable.SetEnd(rtnav)
Set rtNavTable = rtRangeTable.Navigator
REM Find cells in table
Set rtRangeCell = body.CreateRange
Set rtRangePara = body.CreateRange
cellCounter = 0
pozC=0
pozR=0
Call rtNavTable.FindFirstElement(RTELEM_TYPE_TABLECELL)
For ja1=1 To 1
rtNavTable.FindFirstElement(RTELEM_TYPE_TABLECELL)
'msg = ""
cellCounter = cellCounter + 1
If cellCounter Mod CC%=1 Then
pozC=1
Else
pozC=pozC+1
End If
If pozC=1 Then
pozR=pozR+1
End If
REM Set up range and navigator for cell
Call rtRangeCell.SetBegin(rtNavTable)
Call rtRangeCell.SetEnd(rtNavTable)
Set rtNavCell = rtRangeCell.Navigator
REM Find paragraphs in cell
rez1=rtNavCell.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
msg=""
Redim masK(1 To 5) As Variant
k=1
Do
'Call rtNavCell.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH,1)
Call rtRangePara.SetBegin(rtNavCell)
msg = msg & rtRangePara.TextParagraph & Chr(13)
Set notesRTS = rtRangePara.Style
ArreyT1(1, k,1)=notesRTS.Bold
ArreyT1(1, k,2)=notesRTS.Effects
ArreyT1(1, k,3)=notesRTS.FontSize
ArreyT1(1, k,4)=notesRTS.IsDefault
ArreyT1(1, k,5)=notesRTS.Italic
ArreyT1(1, k,6)=notesRTS.NotesColor
ArreyT1(1, k,7)=notesRTS.NotesFont
ArreyT1(1, k,8)=notesRTS.PassThruHTML
ArreyT1(1, k,9)=notesRTS.Strikethrough
ArreyT1(1, k,10)=notesRTS.Underline
k=k+1
Loop While rtNavCell.FindNextElement(RTELEM_TYPE_TEXTPARAGRAPH)
If Messagebox (msg,1, "Cell " & cellCounter)=2 Then
Exit Sub
End If
Next
'===============================ЗАПИСІВАЕМ СИТЛЬ!!===========
For ja1=2 To 4
Call rtNavTable.FindNthElement(RTELEM_TYPE_TABLECELL, ja1)
'msg = ""
cellCounter = cellCounter + 1
If cellCounter Mod CC%=1 Then
pozC=1
Else
pozC=pozC+1
End If
If pozC=1 Then
pozR=pozR+1
End If
REM Set up range and navigator for cell
Call rtRangeCell.SetBegin(rtNavTable)
Call rtRangeCell.SetEnd(rtNavTable)
Set rtNavCell = rtRangeCell.Navigator
REM Find paragraphs in cell
rez1=rtNavCell.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
msg=""
Redim masK(1 To 5) As Variant
k=1
Do
Call rtRangePara.SetBegin(rtNavCell)
msg = msg & rtRangePara.TextParagraph & Chr(13)
Set STILE= s.CreateRichTextStyle( )
STILE.Bold=ArreyT1(1, k,1)
STILE.Effects=ArreyT1(1, k,2)
STILE.FontSize=ArreyT1(1, k,3)
' STILE.IsDefault=ArreyT1(1, k,4)
STILE.Italic=ArreyT1(1, k,5)
STILE.NotesColor=ArreyT1(1, k,6)
STILE.NotesFont=ArreyT1(1, k,7)
STILE.PassThruHTML=ArreyT1(1, k,8)
STILE.Strikethrough=ArreyT1(1, k,9)
STILE.Underline=ArreyT1(1, k,10)
rtRangePara.setStyle(STILE)
'Call body.AppendStyle(STILE)
Call body.Update
k=k+1
Loop While rtNavCell.FindNextElement(RTELEM_TYPE_TEXTPARAGRAPH)
If Messagebox (msg,1, "Cell " & cellCounter)=2 Then
Exit Sub
End If
Next
'===============================ЗАПИСІВАЕМ СИТЛЬ!!===========
Loop While rtNav.FindNextElement(RTELEM_TYPE_TABLE)
Call workspace.editdocument( True, doc)
End Sub
ArreyT1(1, k,1)=notesRTS.Bold
ArreyT1(1, k,2)=notesRTS.Effects
ArreyT1(1, k,3)=notesRTS.FontSize
ArreyT1(1, k,4)=notesRTS.IsDefault
ArreyT1(1, k,5)=notesRTS.Italic
ArreyT1(1, k,6)=notesRTS.NotesColor
ArreyT1(1, k,7)=notesRTS.NotesFont
ArreyT1(1, k,8)=notesRTS.PassThruHTML
ArreyT1(1, k,9)=notesRTS.Strikethrough
ArreyT1(1, k,10)=notesRTS.Underline
Set STILE= s.CreateRichTextStyle( )
STILE.Bold=ArreyT1(1, k,1)
STILE.Effects=ArreyT1(1, k,2)
STILE.FontSize=ArreyT1(1, k,3)
' STILE.IsDefault=ArreyT1(1, k,4)
STILE.Italic=ArreyT1(1, k,5)
STILE.NotesColor=ArreyT1(1, k,6)
STILE.NotesFont=ArreyT1(1, k,7)
STILE.PassThruHTML=ArreyT1(1, k,8)
STILE.Strikethrough=ArreyT1(1, k,9)
STILE.Underline=ArreyT1(1, k,10)
rtRangePara.setStyle(STILE)
Обучение наступательной кибербезопасности в игровой форме. Начать игру!