Avatar of Veniferx
Veniferx
 asked on

Document Generator?

Hello

I'm trying to make a document generator. What I want to be able to do is have a user have 3 options from the start, Make a new document, Load a saved document, and Delete an Old Document. If the user makes a new document (the main part of the program) then a wizard pops up and walks them through it. They'd be able to write the document title in a textbox, the author, etc. All in text boxes. When the wizard is complete, it takes all the data from those text boxes and puts it into a document that can be printed/saved. Any ideas on how to implement this?

One other thing I should note. The main part of the document is structured around dates. I've already programmed this, but when a user clicks a date on a calendar, it adds the date to the data and would then put that on the document. So if the user clicks 5 dates: 2/1, 2/2, 2/3, 2/4, and 2/5; it would put the following on the document:

2/1:
etc

2/2:
etc

2/3:
etc

2/4:
etc

2/5:
etc

What I'd like to do is create forms at runtime for however many dates the user clicked, so that they can edit the "etc" data for each date. So, using the above example, if they clicked 5 dates, 5 forms would be created at runtime that had textboxes on them to edit what went under that date.

Any help would be great.
-Veniferx
Web DevelopmentVisual Basic Classic

Avatar of undefined
Last Comment
DanRollins

8/22/2022 - Mon
RMatzka

It is not quite clear for me what exactly your problem is. Obviously, you have these tasks to solve:
1. Code the wizard user interface
2. Format the data as they are needed in the document
3. Write the document
Maybe you could state in which area your problem is. Or is it in all of them?

As to your specific question at the end, you need to understand that coding a form is more or less the same as coding a class, and that at runtime you create one or more instances of this class. So once you have coded the  form for editing the "etc" stuff, let us say you called the form "fEtc", at runtime you create and display as many instances of this form as you like through code like
dim f as fEtc
set f=new fEtc
show f
where f holds a pointer to an instance of the fEtc form.
Veniferx

ASKER
Thanks RMatzka.

What my problem is is
1 2 and 3. I've written simple documents before, but nothing on the scale of what I want to do, with formatting and all. I'd like some pointers or maybe code examples on how to do it. Has a similar program been made that's open source so I could take a look there and learn from it?

I have most of the wizard coded already, I just need to know how to transfer the data from the textboxes to some kind of temporary file to be loaded into the document, or just loaded directly into the document. I also need to know how to format it. Should I create a template and then replace things with the data that the user put it? Or should I create it on the fly?

I guess you could say I'm just inexperienced and maybe have bitten off more than I can chew, but I need to start somewhere. Like I said, any help would be appreciated.
ASKER CERTIFIED SOLUTION
RMatzka

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
DanRollins

Hi Veniferx,
It appears that you have forgotten to close this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept RMatzka's comment(s) as an answer.

Veniferx, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23