1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| REM ***** BASIC *****
Sub questions
Dim Lot As Integer
Dim Nblots As Integer
Dim Tranche As Integer
Dim Tranche2 As Integer
Dim TrancheLotU As Integer
Dim Options As Integer
Lot = MsgBox ("Le présent marché comprend-t-il plusieurs lots ? ", 4 ,"Décomposition du marché")
if lot = 6 Then rem 6=Oui
Nblots = Msgbox("Y a-t-il des tranches?", 4 , "TFTC")
if Nblots = 6 Then rem 6=Oui
Tranche = MsgBox("Y a-t-il des options ?", 4 , "option")
if Tranche = 6 Then rem 6=Oui
MsgBox(" executer macro plusieurs lots, tranches et options")
Else MsgBox(" executer macro plusieurs lots, tranches sans options")
End if
Else MsgBox(" executer macro plusieurs lots, sans tranches sans options")
End if
Else TrancheLotU = Msgbox("Y a-t-il des tranches?", 4 , "TFTC")
if TrancheLotU = 6 Then rem 6=Oui
Tranche2 = MsgBox("Y a-t-il des options ?", 4 , "option")
if Tranche2 = 6 Then
MsgBox(" executer macro un lot, tranches et options")
Else MsgBox(" executer macro un lot, tranches sans options")
End if
Else rem MsgBox(" executer macro un lot, sans tranches sans options")
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Text"
args1(0).Value = "Le marché est à "
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Bold"
args2(0).Value = true
dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args2())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Text"
args3(0).Value = "lot unique"
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Bold"
args4(0).Value = false
dispatcher.executeDispatch(document, ".uno:Bold", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Text"
args5(0).Value = ","
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args5())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dim args7(0) as new com.sun.star.beans.PropertyValue
args7(0).Name = "Text"
args7(0).Value = "."
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args7())
End if
End if
End Sub |
Partager