Programmation vb

2365 mots 10 pages
Les programmes suivants se trouvent dans Module1

' Option Explicit
Sub Liste_les_commandes()
Application.ListCommands ListAllCommands:=True
End Sub
Sub sel0()
'Dim sel As Selection
'Set sel = Application.Selection
'MsgBox sel
'MsgBox Application.Selection
MsgBox Selection
End Sub
Sub sel1()
Dim i
Dim sel As Selection
Set sel = Application.Selection
MsgBox sel
For i = 1 To 4 sel.MoveRight unit:=wdCharacter, Count:=1
MsgBox sel
'sel.MoveRight unit:=wdWord, Count:=1
'sel.MoveRight unit:=wdSentence, Count:=1, Extend:=wdExtend
'sel.Moveright unit:=wdParagraph, Count:=1
'sel.Moveright unit:=wdLine, Count:=1
'sel.MoveRight unit:=wdStory, Count:=1
'sel.MoveRight unit:=wdCharacter, Count:=1
'sel.MoveRight unit:=wdWord, Count:=1
'sel.MoveLeft unit:=wdWord, Count:=1, Extend:=wdExtend
'sel.Moveright unit:=wdParagraph, Count:=1
'sel.Moveright unit:=wdLine, Count:=1
'sel.MoveRight unit:=wdStory, Count:=1
MsgBox i
Next

Selection.HomeKey unit:=wdLine Selection.MoveRight unit:=wdWord, Count:=3 Selection.EndKey unit:=wdLine Selection.MoveLeft unit:=wdWord, Count:=2 Selection.MoveUp unit:=wdLine, Count:=1 Selection.MoveDown unit:=wdLine, Count:=1

End Sub
Sub sel2()
Dim sel As Selection
Set sel = Application.Selection sel.MoveLeft unit:=wdStory, Count:=1
End Sub
Sub plage0()
Dim plage As Range
Set plage = ActiveDocument.Range(Start:=10, End:=110) plage.Select End Sub
Sub plage1()
Dim plage As Range
Set plage = ActiveDocument.Range(Start:=0, End:=ActiveDocument.Characters.Count) plage.Select End Sub
Sub plage2()
Dim plage As Range
Set plage = ActiveDocument.Range plage.WholeStory plage.Select
End Sub
Sub plage3()
MsgBox ActiveDocument.Characters(ActiveDocument.Characters.Count)
MsgBox ActiveDocument.Characters(ActiveDocument.Characters.Count - 1)
End Sub
Sub plage4()
Dim plage As Range
Set plage = ActiveDocument.Range plage.Expand unit:=wdStory
End Sub
Sub plage5()
Dim plage As Range

en relation

  • corrigé livre de maths terminale sti2d/ stl édition Nathan technique chapitre statistiques à 2 variables
    1885 mots | 8 pages
  • Corrigé test 6
    3114 mots | 13 pages
  • Fonctions Graph35
    1425 mots | 6 pages
  • Code pour creer le jeu de la vie avec excel
    844 mots | 4 pages
  • L'accélération
    394 mots | 2 pages
  • Francais
    477 mots | 2 pages
  • Tableau notes pôle france
    2285 mots | 10 pages
  • Flyff
    6971 mots | 28 pages
  • Marius et la guerre civil
    4637 mots | 19 pages
  • Etude de marché de nespresso en belgique
    5123 mots | 21 pages
  • Programme de descartes
    604 mots | 3 pages
  • MADAME
    558 mots | 3 pages
  • Louise carrière
    463 mots | 2 pages
  • Pduc cora
    3888 mots | 16 pages