Главная страницаОбратная связьКарта сайта

Публикация во FrontPage

Оформил: DeeCo
Автор: http://www.swissdelphicenter.ch

uses comobj;

 {....}

 procedure TForm1.PublishTheWeb(dir, dest, un, pw: string);
 { dir: 
    // location of the local web to publish 
    // Ort des lokalen Webs, das veroffentlicht werden soll }

 { dest 
    // destination URL, where the web to publish 
    // URL, wo das Web veroffentlicht werden soll}
 { un 
    // username 
    // Benutzername }
 { pw 
    // password 
    // Kennwort }
 const
    FpPublishNone = 0;
   FpPublishIncremental = 1;
   FpPublishAddToExistingWeb = 2;
   FpPublishCopySubwebs = 4;
 var
    fp: OLEVariant;
   web: OLEVariant;
 begin
   try
     // create an instance of frontpage 
    // eine Instanz von Frontpage erzeugen 
    fp := CreateOleObject("Frontpage.Application");

     // open the web to publish 
    // das zu veroffentlichende Web offnen 
    web := fp.Webs.Open(dir);

     // before the web can be published, you should open an Internet connection 
    // using rasdial.exe 
    // see Delphi-Tip "...establish a connection to the internet ?" 
    // or you set your Internetoptions to connect automatically to the Internet 

    // Bevor das Web veroffentlicht werden kann, sollte eine Internetverbindung 
    // aufgebaut werden 
    // siehe Delphi-Tip "...eine Internetverbindung aufbauen ?" 
    // oder die Internetoptionen sind so gesetzt, dass eine Verbindung automatisch 
    // aufgebaut wird 

    { open the Internet-connection}

     // publish it 
    // veroffentlichen 
    web.Publish(dest, FpPublishAddToExistingWeb, un, pw)
   except
     ShowMessage("Can""t load FrontPage.")
   end;
 end;

Обсудить статью на форуме


Если Вас заинтересовала или понравилась информация по разработке на Delph - "Публикация во FrontPage", Вы можете поставить закладку в социальной сети или в своём блоге на данную страницу:

Так же Вы можете задать вопрос по работе этого модуля или примера через форму обратной связи, в сообщение обязательно указывайте название или ссылку на статью!
   


Copyright © 2008 - 2024 Дискета.info