Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> jak z php do worda?
PorkOne
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 20.05.2003

Ostrzeżenie: (0%)
-----


jak wysłać stronę wygenerowana z bazy do pliku plik.doc?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
PorkOne
post
Post #2





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 20.05.2003

Ostrzeżenie: (0%)
-----


Po zaladowaniu tego skryptu:
[php:1:64e0b05dbd]<?php
$word = new COM("word.application") or die("Unable to instantiate Word");
print "Loaded Word, version {$word->Version}<BR>";
$testversion = com_get($word->application,version);
print "Version using Com_get(): $testversion <BR>";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("c:test.doc");
$word->Quit();
?>[/php:1:64e0b05dbd]
dostaje komunikat:
Loaded Word, version 10.0
Version using Com_get(): 10.0
php Notice: Use of undefined constant version - assumed 'version' in C:Inetpubwwwrootphpphpfirmaword.php on line 20 php Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft Word Description: Nie można otworzyć miejsca przechowywania makra. in C:Inetpubwwwrootphpphpfirmaword.php on line 30 php Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft Word Description: Żądany element kolekcji nie istnieje. in C:Inetpubwwwrootphpphpfirmaword.php on line 38
mam win2003 (.net) i officeXP
co jest nie tak?


Prosze przeczytac ten topic http://forum.php.pl/viewtopic.php?t=2810 - Seth
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 23:59