...

jazsriel

Member
Local time
Today, 08:15
Joined
Dec 21, 2020
Messages
65
...
 
Last edited:
Hi. Maybe you could either store the result of the file picker to a variable, like a TempVar, or use the CurrentProject.Path property.
 
The file dialog has an initialfilename property if that is what you mean. If you set the initialfilename it opens to that folder and file name.
 
Maybe i am missing something. Why can't you save to initialfilename?
 
I feel like I'm missing something too.
Can you explain a little further? What type of files? Are you opening them to a web control like in Arnel's example? Are you using a custom save button? Can you post an example?
 
You should be able to set an "open at" folder when you call the particular file-open-save-dialog you use. Some may just start at "My Computer" each time, which can be irritating. I think that's the point you are making?
 
Yes you are correct, but that is when you are opening the file. When it does its save it does not reopen to that same location.
OK. I am even more confused. The initialfilename property is the same property of a filedialog regardless of how you configure the filedialog. Configured as a filepicker or saveAs it is still the same property. So why can you not use the initialfilename in the saveas? A simple demo works for me.

Code:
Dim dlgOpen As FileDialog
  Set dlgOpen = Application.FileDialog(msoFileDialogSaveAs)
  dlgOpen.InitialFileName = fileName
  dlgOpen.Show
 
so you are clicking on the native "Save As" button in the pdf file.
 
Now I am less confused I think. You never actually coded any save file code. I believe you are looking at the PDF software. Is is something like?

Adobe.jpg



You are going to have to code your own save as (I think). Do you want to move it or just make a copy?
I have never done this, but my first guess would be
1. I already know the file location since the user picks it.
2. If you know the path (which you do), you can use the file system object to move or copy the file.
3. Code a file save dialog and use FSO to move or copy.

Maybe someone who has done this has a better idea, but that should work.
 
I am wanting to know if there is a way to modify the save button that is already built in to let me choose a default save location.
We dont know what PDF program you're using so couldn't venture a quess. Is it a full version or just a reader?
Why not just open the pdf rather than use a WebBrowser control? You can still use a file picker to choose the pdf to open.
Another option, since it appears to be a fillable form, is to do data entry in a form and then save it as a pdf.

Here's something from DBG - http://www.accessmvp.com/thedbguy/demos/fillablepdf.php
 

Users who are viewing this thread

Back
Top Bottom