+ Reply to Thread
Results 1 to 14 of 14

Convert all pictures & images in specific folder to vba

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Convert all pictures & images in specific folder to vba

    Hello everyone
    I need a macro that enables me to save all the pictures with all the extensions in specific folder
    say : thisworkbook.path &"\Sample Pictures" folder
    all the pictures to be converted to pdf file in the same path
    Thanks advanced
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    Hi -

    One way is to import the picture into your sheet then save as pdf.

    event

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    Hi event21
    Thanks for offering help
    I really found this link but it doesn't work for me
    http://blog.excelvbalab.com/2015/06/...to-single.html
    any idea about that

  4. #4
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    Hi -

    Post what you have right now and specify the error you got.

    event

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    I didn't got an error but got a pdf for my worksheets not for the pictures in the specified folder

  6. #6
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    Hi -

    Can you post your code?

    this code will error definitely, but seems like you have fixed it up
    Please Login or Register  to view this content.
    PicSize is not declare, it should be Pic only.

    Likewise, the folder path and the picture extension should be amended respectively.(maybe you fixed it up also)

    event

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Convert all pictures & images in specific folder to vba

    Saves all jpg pictures in separate pdf files with same name as pictures.
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    @event21
    Yes I fixed it up as you said but I got the same result

    @bakerman
    Thanks for the code but it diesn't work this is a point . Another point I need to deal with all the pictures extensions and to compile all the pictures in one pdf file

    Hope it is clear now

  9. #9
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    @event21
    Yes I fixed it up as you said but I got the same result
    sorry, I have no idea unless I see your file.

    event

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    OK Mr. event21
    Here's my sample
    Attached Files Attached Files

  11. #11
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    Hi -

    Here is your problem
    Please Login or Register  to view this content.
    change it to correct one
    Please Login or Register  to view this content.

    and this line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

    event

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    That's great ..
    now it doesn't export all the extensions ...

  13. #13
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Convert all pictures & images in specific folder to vba

    Hi -

    This will do it.
    Please Login or Register  to view this content.
    event

  14. #14
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Convert all pictures & images in specific folder to vba

    Thank you very much for this great help
    Now it is working very well
    Regards

+ 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] How to convert all pictures from folder to one pdf?
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-19-2015, 10:28 AM
  2. [SOLVED] Trying to play with Pictures/Images...
    By DMcCallister in forum Excel General
    Replies: 3
    Last Post: 08-27-2014, 12:17 PM
  3. IF Statement to place images/pictures
    By BugmanGB in forum Excel General
    Replies: 2
    Last Post: 05-16-2014, 10:57 AM
  4. Replies: 1
    Last Post: 03-14-2014, 06:52 PM
  5. Insert Images/Pictures for an IF Function
    By kibbles in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2013, 11:45 PM
  6. Replies: 2
    Last Post: 06-18-2013, 12:15 PM
  7. Pictures/Images move and distort
    By mmetzler in forum Excel General
    Replies: 0
    Last Post: 06-28-2007, 10:52 AM

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