Einzelnen Beitrag anzeigen

FrankJ28

Registriert seit: 7. Apr 2008
211 Beiträge
 
Delphi 11 Alexandria
 
#1

Delphi2007 auf XE, Wordapplication anders?

  Alt 2. Nov 2010, 09:26
Hallo,
ich stelle derzeit eine größere Applikation von D2007 auf XE um. Die üblichen Verdächtigen String/AnsiString etc. sind ausgeräumt. Beim folgenden Code jedoch bin ich schier am Verzweifeln:
Code:
  var FindText : OleVariant;
      ReplText : OleVariant;
      ReplAll : OleVariant;
      Template : OleVariant;
  begin
   FindText:='#'+such+'#';
   ReplAll :=1;
   Template:=EmptyParam;
   case Nr of
    0 : ReplText:=KdDataSet1.FieldByName(such).AsString;
    1 : ReplText:=AkDataSet1.FieldByName(such).AsString;
    2 : ReplText:=ObDataSet1.FieldByName(such).AsString;
    else ReplText:=KundenBox.Selected.SubItems[Nr];
   end;
   WordDocument.Range.Find.ClearFormatting;
   WordDocument.Range.Find.Execute(FindText,EmptyParam,EmptyParam,EmptyParam,
                                   EmptyParam,EmptyParam,EmptyParam,EmptyParam,
           EmptyParam,ReplText,ReplAll,EmptyParam,EmptyParam,EmptyParam,EmptyParam);
XE meldet beim Execute nicht genügend Parameter. Bei mit Verwirrung, da Execute genau 15 Parameter verlang und auch bekommt. Unter D7 und D2007 funktioniert das ganze prima. Jemand eine Idee?
Danke und ciao
Frank
"Sage was du tust, und tue was du sagst"
Johannes Rau
  Mit Zitat antworten Zitat