Enregistrer sous pdf

Manu62

XLDnaute Impliqué
Bonjour,

Avec Office 2007, on peux enregistrer en pdf.
Avec office 2003, y a t'il une application a installer ou cela n'existe pas ?

Merci BCP

Manu
 

kiki29

XLDnaute Barbatruc
Re : Enregistrer sous pdf

Jour Bon,
pour enregistrer au format pdf, il faut installer un logiciel comme Adobe
Acrobat (le payant, pas seulement le Reader), ou un gratuit comme PDFCreator ( il y en a d'autres )
Dans les 2 cas, une imprimante sera ajoutée à ta liste qui te permettra de
générer un fichier pdf.
 

Manu62

XLDnaute Impliqué
Re : Enregistrer sous pdf

Kiki

As tu 2 - 3 liens qui pourrais me donner les codes pour pdf creator

en fait je voudrais faire une belle macro qui va me faire :

enregistre la feuille sous un n°
envoi un mail avec le N° en objet, l'adresse mail automatique, et le texte automatique.

Je sens que cela va être passionnant

Merci d'avance

Manu
 

Manu62

XLDnaute Impliqué
Re : Enregistrer sous pdf

Bonjour le forum,

J'ai Installer la nouvelle version de pdfcreator (Download PDFCreator 0.9.6 )
J'étais en 0.9.5.

J'avais tous les beugs que vous annoncer dans le post.

en installant la version0.9.6, cela avance mais plante a cette ligne :

JobPDF.cClose

Avez vous un idée.

Je vous en remercie par avance

Manu
 

Manu62

XLDnaute Impliqué
Re : Enregistrer sous pdf

Bonjour,
Ci dessous le code pour enregistrer en pdf sans passer par la boite de dialogue de pdf creator. (Vers 0.9.6)
Comment dans le code, je peux indiquer la feuille concerné (feuil1, ou feuil2)?
Je vous en remercie par avance
Manu

Sub PrintToPDF_Early2()
'Author : Ken Puls (Excelguru.ca | Tips and pointers for Excel and other MS Office applications)
'Macro Purpose: Print to PDF file using PDFCreator
' (Download from SourceForge.net: PDFCreator)
' Designed for early bind, set reference to PDFCreator
Dim pdfjob As PDFCreator.clsPDFCreator
Dim sPDFName As String
Dim sPDFPath As String
Dim RetVal As Variant
'/// Change the output file name here! ///
sPDFName = "J9"
sPDFPath = ActiveWorkbook.Path & Application.PathSeparator
'Check if worksheet is empty and exit if so
If IsEmpty(ActiveSheet.UsedRange) Then Exit Sub
Set pdfjob = New PDFCreator.clsPDFCreator
With pdfjob
If .cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "PrtPDFCreator"
Exit Sub
End If
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
'.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveDirectory") = Range("J10")
.cOption("AutosaveFilename") = Range("J9")
.cOption("AutosaveFormat") = 0 ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
ActiveSheet.PrintOut copies:=1, ActivePrinter:="PDFCreator"
'Wait until the print job has entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 1
DoEvents
Loop
pdfjob.cPrinterStop = False
'Wait until PDF creator is finished then release the objects
Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
RetVal = Shell("Taskkill /IM PDFCreator.exe /F", 0)
' pdfjob.cClose
'Set pdfjob = Nothing
End Sub
 

Discussions similaires

Statistiques des forums

Discussions
312 535
Messages
2 089 387
Membres
104 154
dernier inscrit
Patou