I’m seriously stuck and could use some help. I’m trying to write a macro that will save the active drawing as a PDF. No big deal. I also want the user to be able to decide what directory they want to put it in and possibly change the name. The next time the macro is run, I want to use the previous directory location as the starting directory.
I originally did it by having the user type in the directory path. It worked, but was cumbersome and prone to mistakes. I want to use the Windows ‘GetSaveFileName’ dialog box as the interface. Everyone is used to it.
I was able to get the dialog box to come up and have the correct file name shown in it. The problem is getting the location where the user saved it back from the dialog function. It is supposed to return the path and file name with the “.lpstrFile” variable. The problem is that it truncates the return. If I run the macro over and over, it also becomes unstable. I don’t really understand VB, so I’m hoping that I’m missing something simple. I just need that returned value and I can finish the rest of it.
Has anyone had any success doing this? Thanks.
Chris