Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word automation
Message
 
À
16/12/2003 16:57:14
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00859686
Message ID:
00859770
Vues:
16
AFAIK, there are different kind of "checkboxes" in Word. If they are from the control toolbar, then probably you may use this:
with oWord.ActiveDocument
   for ia=1 to .InlineShapes.Count
      with .inLineShapes(ia)
          if .Type=5 and "checkbox"$lower(.OLEFormat.ClassType)
             ?.OLEFormat.Object.name
             ?.OLEFormat.Object.value
             if (your condition go here)  
                   .OLEFormat.Object.value=.t.
             endif

          endif
     endwith
  endfor
endwith
>All,
>
>Now that I finally got passed the bad document loading and everything seems to be working nicely, I've come up with a pretty far out problem. I've created a fax document that replaces text with the proper fields. In addition, the document contains about 10 checkboxes. Currently the checkboxes are from the control toolbar and can be turned on\off by a user in word. I would like to keep these checkboxes and change the value (so an "X" will display)if certain conditions are met. Tried turning on the macro recorder but it won't let you get to the properties sheet (which is where you can turn the checkbox on/off). I know I could just replace them with some characters and do a document.replace with an "X" or space but I kind of like the looks of them.
>
>Does anyone know how I can reference them (or even if I can) so I can manipulate the value of the checkbox??
>
>Thanks,
>
>Steve
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform