AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Word -Dokument den Cursor positionieren

Ein Thema von aaron · begonnen am 23. Apr 2008 · letzter Beitrag vom 18. Apr 2009
Antwort Antwort
aaron

Registriert seit: 18. Feb 2003
202 Beiträge
 
Delphi 2007 Professional
 
#1

Word -Dokument den Cursor positionieren

  Alt 23. Apr 2008, 10:48
Hallo liebes Forum,

ich füge den Inhalt eines Stringgrid's in Word ein:

Delphi-Quellcode:
  //1. spalte zentriert
    WordApp.Selection.movedown(wdline, lineszaehler, wdextend);
    WordApp.Selection.ParagraphFormat.Alignment := wdAlignParagraphCenter;
  //nächste Spalte
    WordApp.Selection.moveright(wdcharacter, 1);
    if wordversion = '12.0then
      WordTable.Style := 'Tabellengitternetz';
    begin
      ProgressBar1.Max := iRows;
      for iGridRows := 1 to iRows do
      begin
        ProgressBar1.Position := 6 + iGridRows;
        for jGridCols := 1 to iCols do
        begin
          WordTable.Cell(iGridRows, jGridCols).Range.Text := StringGrid2.Cells[jGridCols - 1, igridRows - 1];
        end;
      end;
    end; end else
    ProgressBar1.Position := 0;
Meine Frage wäre, wie kann ich den Cursor ans Ende unter die Tabelle setzen?

Freundliche Grüße
Aaron
  Mit Zitat antworten Zitat
aaron

Registriert seit: 18. Feb 2003
202 Beiträge
 
Delphi 2007 Professional
 
#2

Re: Word -Dokument den Cursor positionieren

  Alt 23. Apr 2008, 11:06
Hab's doch rausgefunden:
WordApp.Selection.EndKey(wdStory); Viele Grüße
aaron
  Mit Zitat antworten Zitat
Trille

Registriert seit: 25. Sep 2007
62 Beiträge
 
#3

Re: Word -Dokument den Cursor positionieren

  Alt 18. Apr 2009, 10:54
Ich muss das Thema nochmal hochholen.

Ich füge eine Tabelle hinzu

Delphi-Quellcode:
// Tabelle hinzufügen
curTable := WordDocument.Tables.Add(WordApplication.Selection.Range, 5, 3,
          defaultTableBehavior, autoFitBehavior);
Nun möchte ich unterhalb dieser Tabelle (eine Zeile Abstand) noch eine Tabelle einfügen.

Ich habe nun folgendes Versucht

Delphi-Quellcode:
moveUnit, moveCount, ext:olevariant;

moveUnit := wdStory;
moveCount := 1;
WordApplication.Selection.EndKey(moveUnit, moveCount);

Er springt zwar ans Ende der Tabelle, nur ist diese nun komplett markiert. Wie kann ich es bewerkstelligen, dass ich beide Tabellen mit einer Leerzeile dazwischen anzeige?
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:30 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz