+ Reply to Thread
Results 1 to 3 of 3

merge PDF submacro gets stuck iin the while loop unless full path of varibale defined

  1. #1
    Registered User
    Join Date
    03-19-2015
    Location
    Austin, Texas
    MS-Off Ver
    2013
    Posts
    21

    Question merge PDF submacro gets stuck iin the while loop unless full path of varibale defined

    Ok so below is a code that takes pdfs from one location based on a visible cell range and then put them in a created directory and then calls another module to merge the pdfs. In the second module there is a variable strPath that when the full folder path is defined it works fine. However trying to use a structure like "..\Submittal Packaged\BOM PDF\" it gets stuck in a while loop. I have debugged and watched it step through and find every pdf file in the folder but instead of not seeing the end it loops back to the beginning.

    The below code is configured in the way I am having issues.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: merge PDF submacro gets stuck iin the while loop unless full path of varibale defined

    the loop is not on files, its on the cells...
    For Each rng In Range("L9:L1042").

  3. #3
    Registered User
    Join Date
    03-19-2015
    Location
    Austin, Texas
    MS-Off Ver
    2013
    Posts
    21

    Re: merge PDF submacro gets stuck iin the while loop unless full path of varibale defined

    Please scroll down further in code the loop it gets stuck in starts like this.

    ' Start the loop.
    Do While strFileName <> ""

    The Sub Copyfile2() is not the issue its the Sub mergepdf()

+ 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] Getting full file path instead of photograph in mail merge document
    By mso3 in forum Word Programming / VBA / Macros
    Replies: 18
    Last Post: 03-08-2016, 11:56 PM
  2. Getting full file path instead of photograph in mail merge
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2016, 02:07 AM
  3. [SOLVED] Run Time 1004 - App Defined or Object defined error with String defined path structure
    By sarails in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2012, 09:38 PM
  4. Replies: 7
    Last Post: 10-09-2009, 10:10 AM
  5. Defined Names 'Stuck'
    By Phil_V in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2009, 10:08 AM
  6. Full path possible to be seen?
    By Octavio in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 07-02-2006, 04:00 PM
  7. [SOLVED] Re: Full path in title bar
    By ntoze in forum Excel General
    Replies: 1
    Last Post: 04-18-2006, 11:25 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