Results 1 to 16 of 16

Thread: [RESOLVED] Form Saved as PDF in another folder

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2021
    Posts
    87

    Resolved [RESOLVED] Form Saved as PDF in another folder

    My project has several forms and the forms are saved automatically. How do I get a form to be sent and saved to another folder. I want to keep the actual form where it's located so I'm looking for something like a command button to copy and send it to say C:\users\richard\desktop\VB Folder.
    I'd like for it to be saved as a PDF. Thanks in Advance!

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Form Saved as PDF in another folder

    Why would you want it saved as pdf? That would be unusable as a form. Are you trying to say that you want to save the visual aspect of it in a pdf or are you saying you want to save the text [code and properties] in a pdf. Also keep in mind a form often has two files the frm and the frx the latter being a binary file.

    Yes it would be simple to save a copy of the form in another folder you can use the VB filecopy function to do this.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Form Saved as PDF in another folder

    What VB calls a "Form" for simplicity is called a dialog window in Windows. That's because it is for user interaction. A Form is not a report.

    A Form does not retain state at runtime. So why on Earth would a program "save Forms automatically?"

    I think somebody is very lost down a labyrinth of rabbitholes.

  4. #4
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: Form Saved as PDF in another folder

    Quote Originally Posted by dilettante View Post
    I think somebody is very lost down a labyrinth of rabbitholes.
    Or got confused with terms and definitions (and confused everyone else here)
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Form Saved as PDF in another folder

    or maybe just wants to use PRINTFORM to a pdf driver
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  6. #6
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: Form Saved as PDF in another folder

    Quote Originally Posted by dilettante View Post
    What VB calls a "Form" for simplicity is called a dialog window in Windows. That's because it is for user interaction. A Form is not a report.

    A Form does not retain state at runtime. So why on Earth would a program "save Forms automatically?"

    I think somebody is very lost down a labyrinth of rabbitholes.
    Presumably, when saying "saves forms automatically", the OP is referring to the saving of a form's relevant contents as addressed in this other recent thread (using code from post #9 I would guess):

    https://www.vbforums.com/showthread....e-Form-Results

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Form Saved as PDF in another folder

    Ok. But if so, where does "PDF" come into play? And why start several threads?

  8. #8

    Thread Starter
    Lively Member
    Join Date
    May 2021
    Posts
    87

    Re: Form Saved as PDF in another folder

    Why I want to save it as PDF is to send it to my clients. I don't want to save my Forms in my project. Or I guess I could send it as a text file? Either way I need help

  9. #9

    Thread Starter
    Lively Member
    Join Date
    May 2021
    Posts
    87

    Re: Form Saved as PDF in another folder

    Sorry, but my Forms are saved automatically. Whenever I enter data and close the form it is saved automatically

  10. #10

    Thread Starter
    Lively Member
    Join Date
    May 2021
    Posts
    87

    Re: Form Saved as PDF in another folder

    Never started several threads, This is my first one

  11. #11

    Thread Starter
    Lively Member
    Join Date
    May 2021
    Posts
    87

    Re: Form Saved as PDF in another folder

    Thanks, that's a start. I'll do some research on printform. Just seemed odd to do a printform

  12. #12
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: Form Saved as PDF in another folder

    or, use MS's Snipping Tool...it's a manual way to do it, but real quick...save as an image file...and send to clients,
    There are several way to save a form as an image in VB6....

    here's one
    Attached Files Attached Files
    Last edited by SamOscarBrown; Jul 13th, 2021 at 10:43 AM.
    Sam I am (as well as Confused at times).

  13. #13
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: Form Saved as PDF in another folder

    Save form as PDF:
    Attached Files Attached Files

  14. #14
    Lively Member
    Join Date
    Nov 2020
    Posts
    67

    Re: Form Saved as PDF in another folder

    Quote Originally Posted by RLPeloquin View Post
    Thanks, that's a start. I'll do some research on printform. Just seemed odd to do a printform
    This project load all PDF printers from the system, next allow to print in PDF printers of your choice, any.

    SaveFormAsPDF.zip

    Last edited by LeoFar; Jul 13th, 2021 at 03:10 PM.

  15. #15
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Form Saved as PDF in another folder

    Quote Originally Posted by RLPeloquin View Post
    Thanks, that's a start. I'll do some research on printform. Just seemed odd to do a printform
    It is odd to do a printform but it is easy. It is also odd to save your data to the registry. The proper way would be to use a database and generate a report.

  16. #16
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,418

    Re: [RESOLVED] Form Saved as PDF in another folder

    Oh dear, and the fun starts, if the Window ("Form") has differing dimensions than A4/Letter......
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width