Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: create checkbox in word document

by Zero_Flop (Pilgrim)
on May 20, 2003 at 03:47 UTC ( [id://259354]=note: print w/replies, xml ) Need Help??


in reply to create checkbox in word document

As I have mentioned in the past the Macro function is your friend.
vb code
Selection.InlineShapes.AddOLEControl ClassType:="Forms.CheckBox.1"

Just convert this to perl. It may take a little trial and error, but you should be able to do it fairly quickly.

Replies are listed 'Best First'.
Re: Re: create checkbox in word document
by WhiteBird (Hermit) on May 20, 2003 at 13:24 UTC
    Zero_Flop is right about the macros. If, however, you can't convert it you can always (as a possible last resort) create the macro in Word and then run it with a Perl command.
    • Create and name the macro in word
    • Declare it at the top of your code
      package MACRO-NAME;
    • When you need the action from the macro, you call it in perl like this:
      $Word->Documents->Open("$dir\\$file") or die "Can't open ", Win32::OLE +->LastError()); $Word->Run("MACRO-NAME");
    This has saved me some time on some hurry-up projects where I didn't have success converting the VBA directly to Perl.
Re^2: create checkbox in word document
by Anonymous Monk on Sep 16, 2014 at 10:24 UTC
    Selection.InlineShapes.AddOLEControl ClassType:="Forms.CheckBox.1

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://259354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-19 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found