+ Reply to Thread
Results 1 to 6 of 6

Macro to convert word into pdf from excel VBA

  1. #1
    Registered User
    Join Date
    03-17-2018
    Location
    Italy
    MS-Off Ver
    2013
    Posts
    26

    Macro to convert word into pdf from excel VBA

    Hi,

    starting with a excel file I would like to convert a specific file (.docx) in a folder, into a .pdf. I can write the path in the code. I would like to do this operation without opening the .docx file.

    Thx for help

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Macro to convert word into pdf from excel VBA

    Please Login or Register  to view this content.

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Macro to convert word into pdf from excel VBA

    Alternatively:
    Please Login or Register  to view this content.
    Note that it's not possible to do as the OP asks without opening the file.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Registered User
    Join Date
    03-17-2018
    Location
    Italy
    MS-Off Ver
    2013
    Posts
    26

    Re: Macro to convert word into pdf from excel VBA

    Hi,

    I insert both the code in a module in excel but doesn't work. I select the code but when I try to execute the macro nothing happens. Where I wrong?

  5. #5
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Macro to convert word into pdf from excel VBA

    Both macros assume you're calling the MakeWordPDFFile sub from another macro or function. Mine assumes only that it's called with the path & name of the Word document (e.g. Call MakeWordPDFFile("some document path & name")); Ken's assumes it's called with the path & name of the Word document and the path & name of the pdf it's to be saved as. Since you said "I can write the path in the code", it's reasonable for us to expect you to know how to do that.

  6. #6
    Registered User
    Join Date
    03-17-2018
    Location
    Italy
    MS-Off Ver
    2013
    Posts
    26

    Re: Macro to convert word into pdf from excel VBA

    You're right! It's work! Thx to both.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] macro to convert excel sheets to ms word docs
    By excelhelpseeker in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-03-2018, 05:44 AM
  2. Convert Word 2007 macro to work in Word 2003
    By kamaflage in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2015, 10:30 AM
  3. Convert Word Table Macro to excel macro
    By vel90 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2015, 01:20 PM
  4. Macro to convert Word docs to Excel
    By matty3332 in forum Excel General
    Replies: 1
    Last Post: 11-24-2014, 09:42 AM
  5. Macro to convert all word files to excel
    By hariexcel1987 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2014, 11:15 AM
  6. Convert Word to Excel based upon Word Table of Contents
    By jcappuccino7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2013, 01:25 PM
  7. excel macro to convert a list of word files to pdf
    By nandu05 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2013, 06:36 AM

Tags for this Thread

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