PDA

View Full Version : Bit of advice on data storage needed please



psyickphuk
06-26-2009, 07:25 AM
<waffle>
Hi I'm designing a document to automate quote generation for my company; the idea being the user enters details (eg customer name, address, products, prices etc) into a form and then these details are entered throughout the document and bookmarked sections are shown or hidden if relevant.

Anyway, this all works fine and I'm pretty pleased with it, however because the document needs to be passed among the team for various input the data entered into the form needs to be retained (ie shown on the form) when the file is saved & closed.

I've got around this by embedding a spreadsheet in the document and when the document is built/populated the info from the form is entered into the cells and then when the form is reopened again it loads the info from the spreadsheet.

Again, this all works fine but I don't like it because 1) I've had to make the spreadsheet tiny and put it outside the white document area so you can't see it but I can imagine this might cause some weird printing issues and 2) the data IMHO should be separate from the document and be in the VBA project like a module or something and this could maybe allow one document to retain multiple quote info.
</waffle>

<questions>
So...
- I don't want a database and ODBC connection and all that as I want it all self contained in one document
- likewise exporting xls files isn't ideal either as I'd like it retained in one file
- I did wonder about static variables being the answer?
- or maybe an xml file but can I embed that inside the document/form somehow?
- I tried putting the spreadsheet in the form (not the document) and it fills with dat fine but this isn't retained when the form is reopened, is that possible?
</questions>


Any suggestions most welcome...

fumei
06-30-2009, 09:19 AM
Document variables seem to be exactly what you are looking for.

They are stored with the document, and can be retrieved as you like.