Windows error 0x80020011, -2147352559

Detailed Error Information

DISP_E_NOTACOLLECTION[1]

MessageDoes not support a collection.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode2 (0x002)
NameFACILITY_DISPATCH[2][1]
DescriptionThe source of the error code is a COM Dispatch.[2][1]
Error Code17 (0x0011)

Questions

2votes
1answer

php replace text in msword using COM

I'm trying to use php replace texts in msword doc. Using COM. throws Error [0x80020011] Does not support a collection. code is copy and modified from VBA. $word = new COM("Word.Application") or die("Word not installed!"); try{ $word->Documents->Open("c:\1.doc"); $word->ActiveDocument->Range->Find->Text="222"; $word->ActiveDocument->Range->Find->Replacement->Text="111"; $word->ActiveDocument->Range->Find->Forward=True; //$word->ActiveDocument->Range->Find->Replace=2; //$word->ActiveDocument->Range->Find->Wrap=1; $word->ActiveDocument->Range->Find->Format=False; $word->ActiveDocument->Range->Find->MatchCase=False; $word->ActiveDocument->Range->Find->MatchWholeWord=False; $word->ActiveDocument->Range->Find->MatchWildcards=False; $word->ActiveDocument->Range->Find->MatchSoundsLike=False; $word->ActiveDocument->Range->Find->MatchAllWordForms=False; $word->ActiveDocument->Range->Find->Execute(); $word->ActiveDocument->SaveAs("c:\2.doc"); [...] read more
php
vba
com
1vote
2answers

perl Win32::OLE ExportAsFixedFormat syntax for powerpoint

I have trouble using perl (strawberry) and win32::ole using powerpoint (from office2010) to convert ppt(x) to pdf. I can export to jpgs fine with Export function but the function ExportAsFixedFormat has a quite obscure syntax and alwawys gives me Win32::OLE(0.1709) error 0x80020011: "Does not support a collection". this is a [...] read more
perl
powerpoint
win32ole
0votes
1answer

Perl Win32::OLE word merging two doc files

I'm trying to merge two document into new doc file but I'm getting error in following code. use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; $meta_file_path = "D:\\copyfrom.doc"; $main_file_path = "D:\\copyto.doc"; my $x = Win32::OLE->GetActiveObject('Word.Application') ; my $word = Win32::OLE->new('Word.Application', sub { $_[0]->Quit; } ); my $doc = $word->Documents->open($meta_file_path) or [...] read more
perl

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0