OK OOP help?
not sure, I am having some fun with COM at the moment, and have achieved my original objective of creating word documents from existing textfiles.
But playing more, I find I want to access and set the font Size of a document, now groping through VB documentation I see that I should be able to do this using
Document->Font.Size = 14
or
Selection->Font.Size = 14
the problem I assume is that the illegal '.' is causing the problem, and I have read that I can use com_set() & com_get() to properly access this property but all I do is frustrate myself and crash apache a lot
basically in the following I want to set the $str variable to a set font size..
I can get it bold (which would do) but that also bolds the included textfile as well.PHP Code:$str .="$row[0]\n\n\n";
$word = new COM("word.application") ;
$word->Visible = 1;
$word->Documents->Add();
$word->Documents[1]->ApplyTheme("Bars");
$word->Selection->TypeText($str);
$word->Selection->InsertFile("$path/$row[3].rtf");
$word->Documents[1]->CheckSpelling();
//$word->Quit();
$word = null;
does anyone have any ideas ???









Bookmarks