note 93699 modified in book.com by thiago

From: Date: Wed, 23 Sep 2009 13:01:24 +0000
Subject: note 93699 modified in book.com by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160978@lists.php.net to get a copy of this message
Add hyperlink at a Word Document's bookmark <?php // Create COM instance to word function clsMSWord($Visible = false) { $this->handle = new COM("word.application") or die("Unable to instanciate Word"); $this->handle->Visible = $Visible; } function WriteHyperlink($Bookmark,$Path,$Text) { $objBookmark = $this->handle->ActiveDocument->Bookmarks($Bookmark); $range = $objBookmark->Range; $objHyperlink = $this->handle->ActiveDocument->Hyperlinks; $objHyperlink->add($range,$Path,"","",$Text); } ?> --was-- Add hyperlink at a Word Document's bookmark // Create COM instance to word function clsMSWord($Visible = false) { $this->handle = new COM("word.application") or die("Unable to instanciate Word"); $this->handle->Visible = $Visible; } function WriteHyperlink($Bookmark,$Path,$Text) { $objBookmark = $this->handle->ActiveDocument->Bookmarks($Bookmark); $range = $objBookmark->Range; $objHyperlink = $this->handle->ActiveDocument->Hyperlinks; $objHyperlink->add($range,$Path,"","",$Text); } http://php.net/manual/en/book.com.php

« previous php.notes (#160978) next »