AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Bild in Word einfügen

Ein Thema von glkgereon · begonnen am 24. Mai 2005 · letzter Beitrag vom 27. Mai 2005
Antwort Antwort
Benutzerbild von glkgereon
glkgereon

Registriert seit: 16. Mär 2004
2.287 Beiträge
 
#1

Bild in Word einfügen

  Alt 24. Mai 2005, 21:15
Hi

ich weiss jetzt nicht ob das das richtige forum ist...

ich würde gerne ein Bild (eigentlich mehrere) in ein Worddokument einfügen.

perfekt wäre es wenn jedes bild auf eine neue seite käme...

ich weiss das es irgendwie mit Olexxx geht/gehen muss, hab aber keine ahnung wie
»Unlösbare Probleme sind in der Regel schwierig...«
  Mit Zitat antworten Zitat
digga

Registriert seit: 26. Jan 2005
11 Beiträge
 
#2

Re: Bild in Word einfügen

  Alt 25. Mai 2005, 18:07
Vielleicht hilft dir das weiter ...

Delphi-Quellcode:
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComObj, StdCtrls;

type
  TForm2 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var winword: variant;
begin
  try
    winword := GetActiveOleObject('Word.Application')
  except
    winword := CreateOleObject('Word.Application');
  end;

  winword.Documents.Add;

  winword.Selection.InlineShapes.AddPicture('D:\Eigene Dateien\Eigene Bilder\DSCF0092.JPG', false, true);
  winword.Selection.EndKey(6);
  winword.Selection.InsertBreak(7);
  winword.Selection.InlineShapes.AddPicture('D:\Eigene Dateien\Eigene Bilder\DSCF0096.JPG', false, true);

  // weitere Bilder einfügen ...

  winword.Visible := true;
end;

end.
  Mit Zitat antworten Zitat
Benutzerbild von glkgereon
glkgereon

Registriert seit: 16. Mär 2004
2.287 Beiträge
 
#3

Re: Bild in Word einfügen

  Alt 26. Mai 2005, 09:16
supi...wird soofort getestet...

was heisst das false, True bei AddPicture?
»Unlösbare Probleme sind in der Regel schwierig...«
  Mit Zitat antworten Zitat
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#4

Re: Bild in Word einfügen

  Alt 26. Mai 2005, 09:26
Zitat von glkgereon:
supi...wird soofort getestet...

was heisst das false, True bei AddPicture?
Schau mal in der VBA Hilfe nach.


Zitat:
expression.AddPicture(FileName, LinkToFile, SaveWithDocument, Range)

FileName Required String. The path and file name of the picture.

LinkToFile Optional Variant. True to link the picture to the file from which it was created. False to make the picture an independent copy of the file. The default value is False.

SaveWithDocument Optional Variant. True to save the linked picture with the document. The default value is False.

Range Optional Variant. The location where the picture will be placed in the text. If the range isn't collapsed, the picture replaces the range; otherwise, the picture is inserted. If this argument is omitted, the picture is placed automatically.
Thomas
  Mit Zitat antworten Zitat
Benutzerbild von glkgereon
glkgereon

Registriert seit: 16. Mär 2004
2.287 Beiträge
 
#5

Re: Bild in Word einfügen

  Alt 27. Mai 2005, 09:24
ok, funzt alles, aber wo finde ich die VBA-Hilfe?
»Unlösbare Probleme sind in der Regel schwierig...«
  Mit Zitat antworten Zitat
teebee

Registriert seit: 17. Jan 2003
Ort: Köln
460 Beiträge
 
Delphi 6 Professional
 
#6

Re: Bild in Word einfügen

  Alt 27. Mai 2005, 10:11
VBA-Reference Word 2003
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

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 11: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