sheng wee
asked on
Pdf to save under the folder that obtain the same name from Pdf
Hello everyone,
I am having one button to create folder behind the Access
Private Sub Command58_Click()
filename = Ref_Number.Value
MkDir "c:\AccessDatabase\" & filename
MkDir "c:\AccessDatabase\" & filename & "\Commercial"
MkDir "c:\AccessDatabase\" & filename & "\Deployment"
MsgBox ("File has been created successfully")
Now I want a button that can save the Pdf into the folder itself based on the same Ref_Number
Dim filename As String
Dim filepath As String
filename = Me.Ref_Number
filepath = "c:\AccessDatabase\" & filename & ".pdf"
DoCmd.OutputTo acOutputReport, "OrderCustomerReport", acFormatPDF, filepath
MsgBox "Quotation has been saved successfully", vbInformation, "Save confirmed"
What code am I missing out? or What code to input?
I am having one button to create folder behind the Access
Private Sub Command58_Click()
filename = Ref_Number.Value
MkDir "c:\AccessDatabase\" & filename
MkDir "c:\AccessDatabase\" & filename & "\Commercial"
MkDir "c:\AccessDatabase\" & filename & "\Deployment"
MsgBox ("File has been created successfully")
Now I want a button that can save the Pdf into the folder itself based on the same Ref_Number
Dim filename As String
Dim filepath As String
filename = Me.Ref_Number
filepath = "c:\AccessDatabase\" & filename & ".pdf"
DoCmd.OutputTo acOutputReport, "OrderCustomerReport", acFormatPDF, filepath
MsgBox "Quotation has been saved successfully", vbInformation, "Save confirmed"
What code am I missing out? or What code to input?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER