#1
|
|||
|
|||
HELP...Beginner
I am trying to automate a customized statement of work. I offer 30 different services but I only want to inlclude those specific to each customer. I was trying to achieve this by creating a word document full of checkboxes that checks to see if a check box is clicked and then inserts a new page and inserts all of the language assocated with the specifc services slected. I think I need VB but do not know where to start. Any help would be greatly appreciated. |
#2
|
|||
|
|||
Hello Leeroy,
Check boxes are InlineShapes Try this for a start: Code:
Dim inls As InlineShape For Each inls In ActiveDocument.InlineShapes If inls.OLEFormat.ClassType = "Forms.CheckBox.1" and _ inls.OLEFormat.Object.Value = True Then 'Do something End If Next Brock |
#3
|
||||
|
||||
That only applies to ActiveX checkboxes. Neither userform checkboxes (available in all Word versions except Word 2008), formfield checkboxes (available in all Word versions) nor content control checkboxes (only available in Word 2010, so far) are InlineShapes.
Leeroy: There a numerous ways of handling this. For example, you could keep the data for all jobs in an Excel spreadsheet, with columns identifying the clients and separate columns for each service and use Word's mailmerge facility to generate the letters. In Excel, you'd input the customer details and the services provided on a new row. If you then create a Word mailmerge document, that points to the Excel workbook as its data source, you can use IF fields in the Word document to vary the text according to what services each record says are provided to a given client. You can then choose to print the documents for whichever clients you want. Another way would be to create a userform with checkboxes to determine what text gets inserted at various points in the document. You could do something similar with a document set up as a form with checkbox formfields.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Just a beginner...be nice please! | Tommy Gun | Project | 1 | 02-18-2009 03:06 AM |