Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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


Comment on Re: create checkbox in word document
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
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 chanting in the Monastery: (6)
As of 2015-07-03 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (55 votes), past polls