... (1 Viewer)

jazsriel

Member
Local time
Today, 10:37
Joined
Dec 21, 2020
Messages
62
...
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 08:37
Joined
Oct 29, 2018
Messages
21,467
Hi. Maybe you could either store the result of the file picker to a variable, like a TempVar, or use the CurrentProject.Path property.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:37
Joined
May 21, 2018
Messages
8,527
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.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:37
Joined
May 21, 2018
Messages
8,527
Maybe i am missing something. Why can't you save to initialfilename?
 

moke123

AWF VIP
Local time
Today, 11:37
Joined
Jan 11, 2013
Messages
3,914
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?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 16:37
Joined
Sep 12, 2006
Messages
15,652
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?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:37
Joined
May 21, 2018
Messages
8,527
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
 

moke123

AWF VIP
Local time
Today, 11:37
Joined
Jan 11, 2013
Messages
3,914
so you are clicking on the native "Save As" button in the pdf file.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:37
Joined
May 21, 2018
Messages
8,527
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.
 

moke123

AWF VIP
Local time
Today, 11:37
Joined
Jan 11, 2013
Messages
3,914
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

Top Bottom