SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    COM help please $Word->Selection->Font.Size

    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..

    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
    I can get it bold (which would do) but that also bolds the included textfile as well.

    does anyone have any ideas ???

  2. #2
    SitePoint Zealot Ace Nova's Avatar
    Join Date
    Aug 2000
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try replacing the "." with a -> but honestly i have no freaking clue
    Ace Nova
    Football Man
    InternetSprite.Com - Coming Soon!

  3. #3
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers Ace - I tried that & all sorts of other combinations - no go
    sometimes I get no errors reported but still no difference in the output, this is really annoying me now - I can do almost everything I am wanting to do except this formatting stuff.

    anyone , even links to hopeful possibles would be cool - I checked out the phpbuilder column but to na avail, I emailed the author as well as he really seems to know his stuff, no joy yet though.

    Come on people FULL office integration is the last step in ASP assimilation, help ..... please


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •