Development Articles
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherDevelopment Articles

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 26th, 2002, 02:56 AM
GiLuX GiLuX is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Location: amsterdam
Posts: 62 GiLuX User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
tip

if you want to find out how to call certain functions in word, you can start a 'recording' session, do your stuff and then examine the code the recoder created.

however, i tried to figure out how to create an unordered list and the recorder created about 30 lines of code for one bullit.

so the recorder can only point you in the right direction but is still somewhat helpful.

is it also possible to use DCOM? and how about security on that one?
__________________
you can get anything you want at alices restaurant

Reply With Quote
  #2  
Old May 18th, 2002, 09:27 AM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Only works when using a windows web server?

Hi Devshed, in the article you wrote:

"I'll assume that you have a working PHP-compliant Web server (either Apache or IIS will do)"

I've tried the code (I'm running PHP 4.0.4 under Apache) and nothing worked. I found another article on PHP & COM and it stated:

"Note that this only works when you are running PHP on a Windows Web server."
http://php.weblogs.com/com_php

Now, who is right? Or is it because of my PHP version?

Greetings,

Barton

Reply With Quote
  #3  
Old June 11th, 2002, 03:31 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Office Assistant

I ran the excel code and got nasty errors that each line of code couldn't be run. I opened excel closed the assistant and it worked great.

Just a tip if anyone else has the same problem.

I develop in VB so this was great article to read!

Reply With Quote
  #4  
Old January 24th, 2003, 02:53 PM
frazaak frazaak is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 1 frazaak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
[no subject]

Using PHP to interface with COM objects does have its advantages, but there is a nasty little quirk with doing this that I noticed the other day. I did the Excel and Word examples and then my computer messed up after I had played a game. I did a CTRL-ALT-DEL to bring up the task manager, and under the Processes tab I had noticed that multiple copies of excel.exe and winword.exe were running in the background (I had run the php files more than once obviously) and eating up approximately 8,000 and 7,000 Kb of memory respectively for each copy (there were 8 copies running between the two of them, using up about 60 Mb of RAM total). I clicked on them and hit the 'End Process' button but windows gave me some nasty error messages and would not let me close them (I use Windows 2000, so I'm not sure if it does this in other windows systems, but if I was to take an educated guess I would say that there would still be this problem). The only way that I could remedy this problem was to reboot my computer.

Reply With Quote
  #5  
Old March 4th, 2003, 05:36 PM
guest
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
_______

>> Or is it because of my PHP version?

where can you see the parsing of the word files?
that script MUST be running on windows server with Word installed ;)
btw, if there will be 5-10 simultanious request for parsing files to the script-- the ****ty IIS may go down because of the Word ;)

Reply With Quote
  #6  
Old March 5th, 2003, 10:54 PM
tshooter91 tshooter91 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 1 tshooter91 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to tshooter91
Only on windows

I guess they assume since the article is about accessing Microsoft COM objects, you would understand it has to be running on a Windows server. This is the case, although I know there are some DCOM implementations that are for Linux and I'm hoping to spend some time trying to access MS COM objects through DCOM from a Linux server. Just for grins.

Reply With Quote
  #7  
Old May 27th, 2003, 11:25 AM
Ducani
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
PHP and COM

PHP and COM

You've already seen how PHP can be used to interface with Java components and JavaBeans. But here's something you didn't know - PHP can (shock shock! horror horror!) even be used to interface with Microsoft COM objects on the Windows platform. Will this be a happy marriage? Read on to find out.

Please discuss this article in this thread. You can read the article here .

Reply With Quote
  #8  
Old May 27th, 2003, 11:40 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 11 m 27 sec
Reputation Power: 27
Just had a quick look through and it looks quite good. I have used PHP with Outlook and Excel quite a bit and have been doing VB COM programming for a few years now.

One thing to be wary of is I have seen many tutorials and articles use constants that are predefined in VB but are not available in PHP.

PHP Code:
 $objApp = new COM("Outlook.Application");
$myItem $objApp->CreateItem(olMailItem); 


I just grabbed this off a tutorial site, code doesnt work since 'olMailItem' is not defined. When you want to convert VB code or try and get junk like the above working its good to have MS Access or Excel running with the VB window open and type into the Immediate window in the IDE ?olMailItem which will print out the value of the constant. You then replace the word with the numerical value.

Reply With Quote
  #9  
Old May 28th, 2003, 09:28 AM
Ducani
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
If you would like to see an article covering a particular topic, please post your request here.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherDevelopment Articles > PHP and COM


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT