Torna al Thread

Public n_AlternativeT As Integer Public HelpLocationT As String Public TemplateLocationT As String Public iwT As String Sub RegistraUtente() Call Registrazione End Sub Sub permutazioni() Call Engine End Sub Sub IncludiEscludi() Dim nTabelle As Integer Dim previousLineStyle As WdLineStyle On Error GoTo GestioneErrori nTabelle = Selection.Tables.Count If nTabelle = 0 Then messaggio = "Il punto di inserimento non si trova all'interno di una tabella" MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" End If If nTabelle = 1 Then previouscolor = Options.DefaultBorderColorIndex previousLineStyle = Options.DefaultBorderLineStyle If Selection.Tables(1).Rows(1).Borders(wdBorderBottom).ColorIndex = wdBlue Then Options.DefaultBorderColorIndex = wdGray25 Selection.Tables(1).Rows(1).Borders.Enable = True Selection.Tables(1).Rows(1).Borders(wdBorderBottom).LineStyle = wdLineStyleDouble Else Options.DefaultBorderLineStyle = wdLineStyleDouble Options.DefaultBorderColorIndex = wdBlue Selection.Tables(1).Rows(1).Borders.Enable = True End If Options.DefaultBorderColorIndex = previouscolor Options.DefaultBorderLineStyle = previousLineStyle End If If nTabelle > 1 Then messaggio = "Il comando 'IncludiEscludi' agisce su un singolo quesito." messaggio = messaggio + Chr(13) + "Per Includere od escludere un insieme di quesiti selezionati utilizzare i comandi 'Includi' oppure 'Escludi'" MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" End If ''''''''''''''''''''' ' GESTIONE ERRORI ' ''''''''''''''''''''' Exit Sub GestioneErrori: If Err.Number = 4605 Then Err.Clear Exit Sub Else Resume Next End If End Sub Sub NuovoQuesito() Dim previousLineStyle As WdLineStyle Dim previouscolor As WdColorIndex If Selection.Information(wdWithInTable) Then messaggio = "Non è possibile inserire un quesito all'interno di una tabella o di un altro quesito." MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" Exit Sub End If Selection.TypeParagraph previouscolor = Options.DefaultBorderColorIndex previousLineStyle = Options.DefaultBorderLineStyle Options.DefaultBorderColorIndex = wdGray25 Options.DefaultBorderLineStyle = wdLineStyleSingle ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1 + n_AlternativeT, NumColumns:= _ 1 Selection.Tables(1).Borders.Enable = True Options.DefaultBorderLineStyle = wdLineStyleDouble Options.DefaultBorderColorIndex = wdBlue Selection.Tables(1).Rows(1).Borders.Enable = True Options.DefaultBorderColorIndex = previouscolor Options.DefaultBorderLineStyle = previousLineStyle End Sub Sub RisposteInOrizzontale() If Selection.Information(wdWithInTable) Then messaggio = "Non è possibile inserire un quesito all'interno di una tabella o di un altro quesito." MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" Exit Sub End If Selection.TypeParagraph '-> Options.DefaultBorderColor = wdColorGray10 Options.DefaultBorderColorIndex = wdGray25 ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:= _ 1 Selection.Tables(1).Borders.Enable = True Selection.MoveDown unit:=wdLine, Count:=1 Selection.Tables(1).Rows(2).Cells.Split NumRows:=1, NumColumns:=n_AlternativeT, MergeBeforeSplit:=False Selection.MoveUp unit:=wdLine, Count:=1 Selection.Tables(1).Rows(1).Borders(wdBorderBottom).LineStyle = wdLineStyleDouble End Sub Sub ImgInLinea() If Selection.Type = wdSelectionIP Then messaggio = "Non ci sono elementi selezionati" MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" Exit Sub End If Selection.Cut Selection.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, _ Placement:=wdInLine, DisplayAsIcon:=False End Sub Sub ShowFormAlt() FormAlternative.Show End Sub Sub Includi() Dim i, nselez As Integer nselez = Selection.Tables.Count If nselez = 0 Then messaggio = "La selezione non contiene quesiti" MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" Exit Sub End If previouscolor = Options.DefaultBorderColorIndex previousLineStyle = Options.DefaultBorderLineStyle For i = 1 To nselez If ActiveDocument.Tables(i).Range.Font.Hidden = False Then Options.DefaultBorderLineStyle = wdLineStyleDouble Options.DefaultBorderColorIndex = wdBlue Selection.Tables(i).Rows(1).Borders.Enable = True End If Next i Options.DefaultBorderColorIndex = previouscolor Options.DefaultBorderLineStyle = previousLineStyle 'Selection.Collapse Application.ScreenRefresh End Sub Sub Escludi() Dim i, nselez As Integer nselez = Selection.Tables.Count previouscolor = Options.DefaultBorderColorIndex previousLineStyle = Options.DefaultBorderLineStyle For i = 1 To nselez Options.DefaultBorderLineStyle = wdLineStyleDouble Options.DefaultBorderColorIndex = wdGray25 Selection.Tables(i).Rows(1).Borders.Enable = True Next i Options.DefaultBorderColorIndex = previouscolor Options.DefaultBorderLineStyle = previousLineStyle Application.ScreenRefresh End Sub Sub HelpDiPermutator() R = Shell("hh.exe " + HelpLocationT, 1) End Sub Sub ContaQuesiti() Dim i As Integer Dim n_inseriti As Integer Dim messaggio As String n_inseriti = 0 For i = 1 To ActiveDocument.Tables.Count If (ActiveDocument.Tables(i).Cell(1, 1).Borders(wdBorderBottom).ColorIndex = wdBlue) = True Then n_inseriti = n_inseriti + 1 End If Next i messaggio = "Numero di quesiti inclusi:" & Str(n_inseriti) MsgBox prompt:=messaggio, Buttons:=64, Title:="Permutator" End Sub Sub NascondiEsclusi() For i = 1 To ActiveDocument.Tables.Count If (ActiveDocument.Tables(i).Cell(1, 1).Borders(wdBorderBottom).ColorIndex = wdBlue) = False Then ActiveDocument.Tables(i).Range.Font.Hidden = True End If Next i ActiveWindow.ActivePane.View.ShowAll = False End Sub Sub MostraEsclusi() For i = 1 To ActiveDocument.Tables.Count If (ActiveDocument.Tables(i).Cell(1, 1).Borders(wdBorderBottom).ColorIndex = wdBlue) = False Then ActiveDocument.Tables(i).Range.Font.Hidden = False End If Next i End Sub Sub ReadPermutatorSettingsT() n_AlternativeT = GetSetting("EduSolutions", "Permutator", "Numero alternative default") HelpLocationT = GetSetting("EduSolutions", "Permutator", "HelpLocation") TemplateLocationT = GetSetting("EduSolutions", "Permutator", "TemplateLocation") HelpLocationT = HelpLocationT + "\Permutator.chm" iwT = GetSetting("EduSolutions", "Permutator", "InfoInst") End Sub
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5