Tabellenränder (Border) per OLE-Automation in Word unsichtbar machen



  • Hallo,
    ich habe mittels folgendem Code eine Tabelle erzeugt und mit Daten gefüllt:

    WordSelection.Exec(Procedure("GoTo") << (int)wdGoToBookmark << 0 << 0 << "Tabelle");
    WordSelection.OleProcedure("TypeText", WideString("")); //für Leerzeile
    
    int colCount = 3;
    int rowCount = ClientDataSet->RecordCount;
    int colAWWidth[3] = {30, 400, 50};
    
    WordRange = WordSelection.Exec(PropertyGet("Range"));
    WordTables = WordRange.OlePropertyGet("Tables");
    WordTable = WordTables.OleFunction("Add", WordRange, rowCount, colCount);
    
    //Tabelleninhalt füllen
    for(int row = 0; row < ClientDataSet->RecordCount; row++)
    {
     for(int col = 0; col < 3; col++)
     {
      cell = WordTable.OleFunction("cell",row+1,col+1);
      cell.OlePropertySet("Width",colAWWidth[col]);
      String content;
      if(col == 0) content = "-";
      else content = ClientDataSet->Fields->Fields[col]->AsString;
      cell.OlePropertyGet("Range").OleProcedure("InsertAfter", WideString(content));
     }
     ClientDataSet->Next();
    }
    

    Wie mache ich nun die Tabellenränder per OLE-Zugriff unsichtbar? Kann mir jemand weiterhelfen?



  • schau mal hier und such dort nach "Borders"

    oder verwende die Suchfunktion und finde das



  • Danke für die schnelle Antwort. Der Code von der frz. Seite hat funktioniert.
    Hast du auch eine Lösung für mein anderes Problem zur Hand?


Anmelden zum Antworten