need to add a variable which will include a quantity number which will need to calculate the cost and make 5 year budget breakdowns. If someone could please reach out and I'll share more.
Printable View
need to add a variable which will include a quantity number which will need to calculate the cost and make 5 year budget breakdowns. If someone could please reach out and I'll share more.
You provide no details for anyone to work with. In any event, this sort of thing is better suited to Excel than to Word.
Paul, this is MS Word template I created a few years ago and works great in Word. I am not looking into changing it into Excel. Let me make some minor updates then I'll share it with you so you better understand what I'm talking about.
Thank you for reaching out.
When the info has been loaded to the Word doc, you will see at the top of page 3 "Qty - 1". Right now there is no variable linked to that, nor a field on the form to enter Qty. That is what I need to change. However, I need help with the variable that will do all the calculations for the number of PCs ordered. Is this doable? I was unable to upload the .dot format, but would be happy to do so via email.
Your document uses Word formfield checkboxes, which means there is/was some VBA code in the template to drive the calculations. Moreover, the document (and template) uses multiple DOCVARIABLE fields that point to Document Variables that would likewise require VBA code to populate. As you've uploaded a docx document, any VBA code that is/was in your template has been deleted from the uploaded document. To upload the dot template, simply zip it and upload the zip archive.
Uploading the zip file.
The code in your template requires giving trusted access to Visual Basic itself. Due to the security risk, I'm not about to do that. You shouldn't, either. The offending line is:
Regardless, your userform makes no provision for the user to input the number of devices, etc. of a given configuration. Hence the Qty can never be more than 1, so it's a fixed value in the document.Code:Me.Caption = ThisDocument.VBProject.Description & " - Step " & mpgSteps.Value + 1
Due to the hard-coding of item values and device configurations in your userform, your code would also be difficult for anyone else to maintain. You should consider having your code reference a separate text file, Word document, or Excel workbook, and reading the item values and device configurations from there. That way, end-users can simply change the item values and device configurations in the reference file.
Simply making provision for the user the input the number of devices looks unlikely to be sufficient unless you can ensure all of the ordered devices will have the same configuration; otherwise, you'll need to specify how many Adobe, Project, etc. licenses are required - and, presumably, ensure users can't order more licenses than devices. All this would require a significant coding effort.
The thought is of updating the userform by adding a field to input the number of devices, etc. I could do that, it's the hard-coding that I need help with; however, I see what you mean in your last paragraph.
I have never done any coding that would reference a sperate text file, etc as you recommend. I wouldn't know where to start. Would that change the the whole template and how long will that take?
As I said:
Not only would your template itself need some redesign, so too - especially - would the userform and the code behind it. Since there seems to be a business case for this, your firm should consider engaging a professional coder to do the job.