Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: Kalifa pe Simpatie
| Femeie 19 ani Ialomita cauta Barbat 19 - 32 ani |
|
TRaP
Moderator
Inregistrat: acum 6 ani
Postari: 748
|
|
Sub Word_PageExportPDF()
Dim startPage As String Dim endPage As String Dim AllPages As Variant Dim CurrentFolder, FileName, myPath As String
'Store Information About Word File myPath = ActiveDocument.FullName CurrentFolder = ActiveDocument.Path & "\"
If ActiveDocument.Path = "" Then MsgBox "Nu ai salvat inca documentul." & vbCrLf & _ "Nu se poate salva fisierul PDF pentru ca nu se stie unde." Exit Sub End If
FileName = Mid(myPath, InStrRev(myPath, "\") + 1, _ InStrRev(myPath, ".") - InStrRev(myPath, "\") - 1)
AllPages = MsgBox("Daca vrei sa salvezi toate paginile in PDF apasa Yes, " & _ vbCrLf & "daca vrei sa salvezi numai anumite pagini apasa No, " & _ vbCrLf & "iar daca vrei sa anulezi apasa Cancel", vbYesNoCancel)
If AllPages = vbCancel Then Exit Sub
If AllPages = vbYes Then ActiveDocument.ExportAsFixedFormat _ OutputFileName:=CurrentFolder & FileName & ".pdf", _ ExportFormat:=wdExportFormatPDF, _ OpenAfterExport:=False, OptimizeFor:= _ wdExportOptimizeForPrint, Item:=wdExportDocumentContent, _ IncludeDocProps:=True, KeepIRM:=True, _ CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ BitmapMissingFonts:=True, UseISO19005_1:=False Else
startPage = InputBox("Scrie numarul primei pagini si apasa OK") If startPage = vbNullString Then Exit Sub
endPage = InputBox("Scrie numarul ultimei pagini si apasa OK") If endPage = vbNullString Then Exit Sub
ActiveDocument.ExportAsFixedFormat _ OutputFileName:=CurrentFolder & FileName & " - pag " & endPage & "-" & endPage & ".pdf", _ ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ wdExportOptimizeForPrint, Range:=wdExportFromTo, From:=startPage, To:=endPage, Item:= _ wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ BitmapMissingFonts:=True, UseISO19005_1:=False End If
End Sub
|
Modificat de TRaP (acum 5 ani)
|
|
pus acum 5 ani |
|