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
| Shell "C:\Codex regionnal CV01\TransfertCODEX.exe"
ChangeFileOpenDirectory "U:\WorkArea\Application Data\BANK\Codex\"
Documents.Open FileName:="TRANFERT.RES", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, Encoding:=1252
With ActiveDocument.Styles(wdStyleNormal).Font
If .NameFarEast = .NameAscii Then
.NameAscii = ""
End If
.NameFarEast = ""
End With
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(2.03)
.BottomMargin = CentimetersToPoints(2.03)
.LeftMargin = CentimetersToPoints(2.5)
.RightMargin = CentimetersToPoints(2.5)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.25)
.FooterDistance = CentimetersToPoints(1.25)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(21)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
.LayoutMode = wdLayoutModeDefault
End With
Selection.Delete Unit:=wdCharacter, Count:=1
Windows(2).Activate
Selection.WholeStory
Selection.Font.Size = 8
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveDown Unit:=wdLine, Count:=6
Selection.MoveRight Unit:=wdCharacter, Count:=83
Selection.MoveRight Unit:=wdCharacter, Count:=5, Extend:=wdExtend
With ActiveDocument.Bookmarks
.Add Range:=Selection.Range, Name:="Nomsauvegarde"
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Dim bb As Word.Bookmark
Set bb = ActiveDocument.Bookmarks("Nomsauvegarde")
ActiveDocument.SaveAs "U:\WorkArea\Application Data\BANK\Codex\" & bb.Range.Text
MsgBox "Votre fichier a été enregistré sous U:\WorkArea\Application Data\BANK\Codex"
ActiveDocument.Close
End Sub |
Partager