Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: create checkbox in word document

by cacharbe (Curate)
on May 20, 2003 at 13:16 UTC ( #259441=note: print w/replies, xml ) Need Help??


in reply to create checkbox in word document

To answer your question with perl:
use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Word'; $Win32::OLE::Warn = 2; my $Word = Win32::OLE->GetActiveObject('Word.Application') || Win32::OLE->new('Word.Application', 'Quit'); $Word->{'Visible'} = 1; my $Doc = $Word->Documents->Add(); $Word->Selection->WholeStory; $Word->Selection->InlineShapes->AddOLEControl({ClassType=>'Forms.Ch +eckBox.1'});

You'll probably have to read the class documentation to get the names for the ClassTypes for OLEControls, but that's a good exercise for the reader.

C-.

---
Flex the Geek

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2023-03-23 08:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?