Posted By: Keson (Keson) on 'CZunix'
Title:     Re: prevod do pdf
Date:      Mon Apr 11 15:56:18 2005

> 
> Potrebuju nejakym zpusobem automatizovat prevod wordovych dokumentu do pdf. 
> Wordove dokumenty jsou ulozeny na unixovem serveru. Pouzit open office 
> nepripada v uvahu, firemni dokumenty bohuzel nezvlada. 
> Mam k dispozici linux a windows s vmware, nainstlaovany M$ office - prevod
> do 
> pdf se provadi tiskem na pdf "tiskarnu" ve win. Pripadne normalni win 
> workstation s officama. 
> 
> Nenapada vas nahodou, jak to oskriptovat? Jestli trebas neexistuje nejaky 
> projekt, ktery by to umoznoval....
> 
> Dikec,
> Jet.
>  
>  

zkus treba tohle
 - zpristupni si dokumenty do widli (samba?)
 - udelej si seznam (perl?) a pastni do skriptu
        (programovat search ve VB se ti doufam nechce)
 - nastav si default tiskarnu na PDF

a ve wordu pust:

Sub Quork()
'
' Quork Makro
' Print files to file (using default printer)
'

    Dim files As Variant
    files = Array( _
        "D:b.doc", _
        "D:c.doc" _
        )

    For Each file In files
    
        file_out = Mid(file, 1, Len(file) - 3) & "pdf"
        
        
        ' print file
        Application.PrintOut FileName:=file, _
            Range:=wdPrintAllDocument, _
            Item:=wdPrintDocumentContent, _
            Copies:=1, _
            Pages:="", _
            PageType:=wdPrintAllPages, _
            ManualDuplexPrint:=False, _
            Collate:=True, _
            Background:=True, _
            PrintToFile:=True, _
            PrintZoomColumn:=0, _
            PrintZoomRow:=0, _
            PrintZoomPaperWidth:=0, _
            PrintZoomPaperHeight:=0, _
            OutputFileName:=file_out, _
            Append:=False
            
    Next
End Sub

                                              Keson
* * * * * * * * * * * * * 
  a stejne je hezky :-)
* * * * * * * * * * * * * 

Search the boards