Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Good Pdf utility
I am currently using pdf995's omniformat to batch process txt to pdf's. Does
anyone have a recommendation for an alternative? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Good Pdf utility
I've had great luck with Microsoft's own:
Install the Word Save as PDF or XPS option http://www.microsoft.com/downloads/d...displaylang=en |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Good Pdf utility
But does it work as a batch utility? I need to convert a directory of files
into pdf's, they are text files created by another program. Mike "tomcam" wrote: I've had great luck with Microsoft's own: Install the Word Save as PDF or XPS option http://www.microsoft.com/downloads/d...displaylang=en |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Good Pdf utility
Provided you have Word 2007, then yes, you can batch process files with the
Word PDF creation tool. If that tool is installed, the following macro will work with all documents in doc or docx format in a folder selected from the macro. The macro will throw an error if any of the documents are mail merge documents, but should work fine with documents that contain simply text. If the documents are plain text with a TXT extension then the macro will require some changes, but we'll cross that bridge if required. Sub SaveAllAsPDF() Dim strFileName As String Dim strDocName() As String Dim strPath As String Dim oDoc As Document Dim fDialog As FileDialog Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) With fDialog .Title = "Select folder and click OK" .AllowMultiSelect = False .InitialView = msoFileDialogViewList If .Show -1 Then MsgBox "Cancelled By User", , "Save all as PDF" Exit Sub End If strPath = fDialog.SelectedItems.Item(1) If Right(strPath, 1) "\" Then strPath = strPath + "\" End With If Documents.Count 0 Then Documents.Close SaveChanges:=wdPromptToSaveChanges End If strFileName = Dir$(strPath & "*.doc") While Len(strFileName) 0 WordBasic.DisableAutoMacros 1 Set oDoc = Documents.Open(strPath & strFileName) strDocName = Split(oDoc.FullName, ".") If ActiveDocument.SaveFormat = 0 Or _ ActiveDocument.SaveFormat = 12 Then ActiveDocument.SaveAs _ FileName:=strDocName(0) & ".pdf", _ FileFormat:=wdFormatPDF End If oDoc.Close SaveChanges:=wdDoNotSaveChanges strFileName = Dir$() Wend WordBasic.DisableAutoMacros 0 End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org M_C wrote: But does it work as a batch utility? I need to convert a directory of files into pdf's, they are text files created by another program. Mike "tomcam" wrote: I've had great luck with Microsoft's own: Install the Word Save as PDF or XPS option http://www.microsoft.com/downloads/d...displaylang=en |
#5
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Good Pdf utility
Thank-you! I will look into it.
"Graham Mayor" wrote: Provided you have Word 2007, then yes, you can batch process files with the Word PDF creation tool. If that tool is installed, the following macro will work with all documents in doc or docx format in a folder selected from the macro. The macro will throw an error if any of the documents are mail merge documents, but should work fine with documents that contain simply text. If the documents are plain text with a TXT extension then the macro will require some changes, but we'll cross that bridge if required. Sub SaveAllAsPDF() Dim strFileName As String Dim strDocName() As String Dim strPath As String Dim oDoc As Document Dim fDialog As FileDialog Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) With fDialog .Title = "Select folder and click OK" .AllowMultiSelect = False .InitialView = msoFileDialogViewList If .Show -1 Then MsgBox "Cancelled By User", , "Save all as PDF" Exit Sub End If strPath = fDialog.SelectedItems.Item(1) If Right(strPath, 1) "\" Then strPath = strPath + "\" End With If Documents.Count 0 Then Documents.Close SaveChanges:=wdPromptToSaveChanges End If strFileName = Dir$(strPath & "*.doc") While Len(strFileName) 0 WordBasic.DisableAutoMacros 1 Set oDoc = Documents.Open(strPath & strFileName) strDocName = Split(oDoc.FullName, ".") If ActiveDocument.SaveFormat = 0 Or _ ActiveDocument.SaveFormat = 12 Then ActiveDocument.SaveAs _ FileName:=strDocName(0) & ".pdf", _ FileFormat:=wdFormatPDF End If oDoc.Close SaveChanges:=wdDoNotSaveChanges strFileName = Dir$() Wend WordBasic.DisableAutoMacros 0 End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org M_C wrote: But does it work as a batch utility? I need to convert a directory of files into pdf's, they are text files created by another program. Mike "tomcam" wrote: I've had great luck with Microsoft's own: Install the Word Save as PDF or XPS option http://www.microsoft.com/downloads/d...displaylang=en |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autocorrect Utility | Microsoft Word Help | |||
I'd like to get a utility program professionally written | New Users | |||
good relations with a client is to have a good ? | Microsoft Word Help | |||
Is there a wpm utility? | Microsoft Word Help | |||
WORD graphing utility? | New Users |