Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃdelphi°ÉÒ»¸öwordÎĵµ×·¼Óµ½ÁíÍâÒ»¸öwordÎĵµÖÐ

uses ComObj;
var WordApp: Variant;
begin
WordApp := CreateOleObject('Word.Application');
WordApp.Documents.open('c:\1.doc');
WordApp.Selection.InsertFile('c:\2.doc','',False,false,false);
WordApp.Selection.InsertFile('c:\3.doc','',False,false,false);
WordApp.ActiveDocument.SaveAs('C:\4.doc');//,'wdFormatDocument',False,'',True,'',False,False,False,False,False);
WordApp.Quit;
OleContainer1.CreateObjectfromFile('c:\4.doc',true);
procedure TFrm_Main.btUniteClick(Sender: TObject);
var
I: Integer ;
DocFileName: String ;
DocFile:OleVariant ;
begin
if lvFileName.Items.Count <1 then
Exit ;
btUnite.Enabled := False ;
try
pnJC.Visible := True ;
Frm_Main.Update ;
try
WordA.Connect ;
WordA.Visible := True;
WordDocument1.ConnectTo(WordA.Documents.Add(EmptyParam,EmptyParam,EmptyParam,EmptyParam) );
MixWordWindow('Word ÎĵµºÏ²¢Æ÷');
for I := 0 to lvFileName.Items.Count -1 do
begin
ProgressBar1.Position := I * 100 div lvFileName.Items.Count ;
Label3.Caption := lvFileName.Items.Item[I].SubItems.Strings[0] ;
Frm_Main.Update ;
DocFileName := lvFileName.Items.Item[I].SubItems.Strings[0] ;
WordA.Selection.InsertFile(DocFileName,EmptyParam,EmptyParam,EmptyParam,EmptyParam) ;
end;
ProgressBar1.Position := 100 ;
if CheckBox1.Checked then
begin
DocFile := edDocFileName.Text ;
WordDocument1.SaveAs(DocFile);
end ;
if CheckBox2.Checked then lvFileName.Items.Clear ;
if (CheckBox3.Checked) and (CheckBox1.Checked) then WordA.Quit ;
WordA.Disconnect ;
if CheckBox1.Checked then
Application.MessageBox(PChar('ÎĵµºÏ²¢¹¤×÷ÒѾ­³É¹¦µÄÍê³É¡£±£´æÔÚ' + #13+ edDocFileName.Text ),'Íê³É', MB_OK or MB_ICONINFORMATION)
else
Application.MessageBox(PChar('ÎĵµºÏ²¢¹¤×÷ÒѾ­³É¹¦µÄÍê³É¡£Ç뼰ʱ±£´æ¸ÃÎĵµ£¡' ),'Íê³É', MB_OK or MB_ICONINFORMATION) ;
if CheckBox1.Checked then
begin
DocCount := DocCount + 1 ;
edDocFileName.Text := ExtractFilePath(edDocFileName.Text) + 'ºÏ²¢Îĵµ'+ IntToStr(DocCount) +'.Doc' ;
end;
except
on E: Exception do
begin
Application.Mess


Ïà¹ØÎĵµ£º

DelphiÉî¶È̽Ë÷Ö®×Ô¶¯Íê³ÉÍâ¿ÇÀ©Õ¹

ÒýÓÃ×Ô£ºhttp://develop.csai.cn/delphi/NO000001.htm
×Ô¶¯Íê³É¼ò½é
¡¡¡¡´ó¼ÒÒ»¶¨¶¼·Ç³£ÊìϤIEä¯ÀÀÆ÷µÄµØÖ·ÊäÈë±à¼­¿ò£¬ËüÌṩÁË×Ô¶¯Íê³ÉµÄ¹¦ÄÜ¡£×Ô¶¯Íê³É£¨Auto Complete£©¹¦Äܼò»¯Á˱༭¿òµÄÊäÈ빦ÄÜ£¬Ëü¿ÉÒÔ¸ù¾ÝÒѾ­ÊäÈëµÄ²¿·Ö×Ö·û´®½øÐÐÔ¤²âºÍÆ¥Å䡣ͼ2.7µÄÀý×Ó£¬ÑÝʾÁË×Ô¶¯Íê³É¿ÉÒÔÒÀ¾ÝÊäÈëµÄ“pro”£¬¸ø³ ......

delphi KOL Ìåϵ

Ò»¡¢KOLÊÇʲô?KOLÄÜ×öʲô? MCKÊÇʲô?MCKÄÜ×öʲô?
KOLÊÇÒ»Ì×¶ÔÏó¿â£¬Ãâ·Ñ¶øÇÒ¿ª·ÅÔ´´úÂ룬´ó¼Ò¿ÉÒÔhttp://www.kolmck.net/È¥ÏÂÔØµ½
Ëü¡£ËüÄܹ»Ê¹Delphi±à³ö³ß´ç·Ç³£Ð¡µÄ32λWindowsͼÐÎÓû§½çÃæµÄÓ¦ÓóÌÐò¡£
Ŀǰ֧³ÖµÄDelphi°æ:Delphi6,Delphi5,Delphi4,Delphi3ºÍDelphi2¡£
ʹÓÃKOLÔÚD2-D5ÖбàдµÄ×îСͼÐνçÃæ³ÌÐò ......

֪ʶС½á(Delphi)

1) Error loading midas.dll     ûÓÐ×¢²ámidas.dll ÔËÐÐRegSver32.exe midas.dll
2)Result := GetProcAddress(FGDIPlusLibrary, PChar(ProcName));±àÒë ³öÏÖÕâÑùµÄÎÊÌ⣬Ӧ¸ÃÊÇÉèÖ÷½ÃæµÄÎÊÌ⣬Project->Options->Complier->Hugestrings ¹³ÉϾÍokÁË£¡
3) TCheckListBoxÓиöitemEnable ......

delphi֮ģÄâµã»÷ÍøÒ³Öеİ´Å¥

unit Unit1;   
  
interface  
  
uses  
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   
   Dialogs, StdCtrls, OleCtrls, SHDocVw;   
  
t ......

¸øDelphi¿Ø¼þÉèÒ»¸öͼ±ê

·½·¨Ò»£º
¿Ø¼þÀà½Ð×ö   TABC,ÎļþÃû½Ð abc.pas ÄÇôн¨Á¢Ò»¸öÎļþ½Ð
abc.rc
ÀïÃæÄÚÈÝÊÇ
TABC Bitmap icon.bmp
icon.bmp ¾ÍÊÇͼƬÎļþÃû£¬²»Òª³¬¹ý256É«£¬24x24
È»ºóÔÚÃüÁîÐÐÏÂÖ´ÐÐ brcc32 abc.rc¾Í»áÉú³É abc.res
¸ÄÃûΪ abc.dcr
´ò¿ªÄã¿Ø¼þµÄ dpkÎļþ£¬ ¼ÓÉÏ {$R ABC.DCR}
ÖØÐ±àÒë¾Í¿ÉÒÔÁË¡£
±ã½Ý·½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ