+ Reply to Thread
Results 1 to 1 of 1

Excel Macro to convert list of files to pdf

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2011
    Location
    UAE
    MS-Off Ver
    Excel 2003
    Posts
    2

    Excel Macro to convert list of files to pdf

    Hi,

    I have a number of wordfiles listed in an excel sheet, need to convert all the filenames listed to pdf. used below macro, giving error. I wonder if any one of you can help me in this regard.



    Sub ExportFile()
    
    For I = 1 To Range("A2").End(xlDown).Row
    oldName = Cells(I, 1).Value
    newName = Cells(I, 2).Value
    Set Documents = GetObject(oldName)
    
    ActiveDocument.ExportAsFixedFormat , Filename:=newName, ExportFormat:=wdExport.pdf
    
    
    Next
    
    End Sub
    Last edited by arlu1201; 02-05-2013 at 04:56 AM. Reason: Use code tags as per forum rules.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1