in reply to Perl Com Ojbects

What error do you get in Win32::OLE->LastError() ?

I don't see the "ZipAFile" method documented anywhere.

From what I can tell of the API, The call sequence is:

my $zip = $r->NewZip("Type.zip"); $zip->AppendOneFileOrDir("type.txt"); $zip->CloseZip();

        "Think of how stupid the average person is, and realize half of them are stupider than that." - George Carlin

Replies are listed 'Best First'.
Re^2: Perl Com Ojbects
by cdlvj (Novice) on Feb 22, 2016 at 20:48 UTC

    The trick is two fold. Have to add

    sub New { return new packagename; }
    Set obj = CreateObject("My.ZipObject") Set objr = obj.New Set rc = objr.zipAFile("type.txt","Type.zip")
    or
    my $r = Win32::OLE->new('My.ZipObject'); print "\nZip DLL error code " . Win32::OLE->LastError(); my $oo = $r->new; my $exitcode = $oo->zipAFile("type.txt","Type.zip");