Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2011, 12:55 PM
Leeroy4022 Leeroy4022 is offline HELP...Beginner Windows XP HELP...Beginner Office 2007
Novice
HELP...Beginner
 
Join Date: Feb 2011
Posts: 1
Leeroy4022 is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 02-21-2011, 10:23 PM
cksm4 cksm4 is offline HELP...Beginner Windows XP HELP...Beginner Office 2007
Advanced Beginner
 
Join Date: Aug 2010
Posts: 48
cksm4 is on a distinguished road
Default

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
I'm a little new myself so I am sure someone can offer a cleaner version

Brock
Reply With Quote
  #3  
Old 02-25-2011, 02:16 AM
macropod's Avatar
macropod macropod is offline HELP...Beginner Windows 7 32bit HELP...Beginner Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by cksm4 View Post
Check boxes are InlineShapes
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]
Reply With Quote
Reply



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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft