Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: WIn32::OLE debug

by Corion (Patriarch)
on Oct 12, 2025 at 08:03 UTC ( [id://11166466]=note: print w/replies, xml ) Need Help??


in reply to WIn32::OLE debug

It helps a bit to know about VBA / OLE. The ->Item method is what is used to enumerate arrays. The in function is what maps that to Perl.

In your code, you have:

my $tables = $word->ActiveDocument->{Tables}; for my $table (in $tables) {

If the document has no tables, maybe $tables is undef. Check for that.

If your debugger crashes, do print debugging:

my $tables = $word->ActiveDocument->{Tables}; print "Tables is <$tables>"; print sprintf "Tables has %d items", $tables->Count; for my $table (in $tables) {

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2026-02-19 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.