Hello,
I need a way to search for the existence of a word.doc (the name of which is located in a particular cell). If the file exists, I want to open the file and bring it to the front. If it does not existI want to open a different word.doc and bring to the front and complete some code that is already working.
Tricky part 1: if the file already exists, it may be located in multiple subdirectories from a single parent directory.
I have seen a number of posts of recursive functions, but they all seem too complex from my needs and my VBA skills are not quite sharp enough to simplify them.
Tricky part 2: I need something that works without shell scripts or calling on the cmd terminal. I need this code to run while being remotely logged in to a citrix server that does not give me access to cmd terminal (at least, that is my understanding).
Side note:I would like to execute this code from a button click that also copies a designated range of cells to the clip board.
I was able to get everything working before when I just needed to copy info and opening a specific file. I was even able to print info from the workbook to the header of the newly opened word.doc. After getting this to work, however, I realized that there may be some instances when the file is already created. To address this I am hoping to add that "recursive search and open else ..." function mentioned above.
Here is what I have so far, I just don't know how to go about the recursive search:
Please let me know if something doesn't make sense.Please Login or Register to view this content.
Thanks in advance for help!
Bookmarks