trichview.com

trichview.support




Re: List Index Out Of Bounds???


Return to index


Author

Message

Jamie

Posted: 12/05/2002 0:09:49


OK That worked sort of, but what I have is


InsertRTFFromStream (Header)

then my addtable...

then another InsertRTFFromStream (Footer)


and the Insert RTFFromStream stuff is together and the table is at the end

of the document... When what I wanted was the table between the header and

footer..???



This is my code, can you see where I'm going wrong??? This is almost my last

step :) Thanks for all your help!




  // Insert the Header...

  Stream := TMemoryStream.Create;

  SettingsForm.Headerrve.SaveRVFToStream(Stream,False);


  EMailForm.rve.Clear;

  Stream.Position := 0;


EMailForm.rve.InsertRVFFromStream(Stream,SettingsForm.Headerrve.ItemCount);

  Stream.Free;


  // insert the Title...

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL(DM.OfferFaxQuery.FieldByName('Title').AsString,4,1);

  EMailForm.rve.AddNL('',0,0);

  EMailForm.rve.AddNL('',0,0);


  // Insert the table...

  table := TRVTableItemInfo.CreateEx(DM.OfferFaxQuery.RecordCount+1,6,

EMailForm.rve.RVData);


  table.BorderStyle := rvtbRaisedColor;

  table.CellBorderStyle := rvtbLoweredColor;


  table.BorderLightColor := clBlack;

  table.BorderColor := clBlack;

  table.CellBorderLightColor := clBlack;

  table.CellBorderColor := clBlack;

  table.Color := clWhite;


  table.BorderWidth := 1;

  table.CellBorderWidth := 1;

  table.CellPadding := 1;

  table.CellVSpacing := 1;

  table.CellHSpacing := 1;

  table.BorderVSpacing := 1;

  table.BorderHSpacing := 1;


  for r := 0 to table.Rows.Count-1 do

    for c := 0 to table.Rows[r].Count-1 do

      table.Cells[r,c].BestWidth := 60;


  EMailForm.rve.AddItem('', table);


  // Load the footer into the document...

  Stream := TMemoryStream.Create;

  SettingsForm.Footerrve.SaveRVFToStream(Stream,False);

  Stream.Position := 0;


EMailForm.rve.InsertRVFFromStream(Stream,SettingsForm.Footerrve.ItemCount);

  Stream.Free;


  EMailForm.rve.Format;









Powered by ABC Amber Outlook Express Converter