Jump to content

Recommended Posts

you can open only in server side using

 

shell_exec("C:\Word Folder\winword.exe /ttemplate name");

 

more info:

http://support.microsoft.com/kb/290961

 

So when we have intranet and we want to let users start templates via Intranet and MS-Word, it should not be possible to run the template onto visitors their local computer?

I have no idea what an ms-word template actually is, but you could create it on the server and then have your users download it.

 

Or, you could (like I mentioned) try opening the template on a remotely accessed drive. Given the correct permissions, I can open remote drives from my windows machine at work quite easily.

 

\\machinename\c$

 

Will give me access to the C drive of the pc called machinename for instance.

I have no idea what an ms-word template actually is, but you could create it on the server and then have your users download it.

 

Or, you could (like I mentioned) try opening the template on a remotely accessed drive. Given the correct permissions, I can open remote drives from my windows machine at work quite easily.

 

\\machinename\c$

 

Will give me access to the C drive of the pc called machinename for instance.

 

a template is a written word doc with some wizzards that the use has to fill. The internal VBA software is taking care for things like house style, layout and other automated information.

 

You're right, the best way to do this all is at the server-side, but there is a big BUT:

 

Our current templates (many!) are based and adjusted for usage on their local machines, it looks up e.g. username, file counter and other stuff like that. Copying this stuff to server-side is not an easy option for us.

 

It's so strange, Windows-update and many online virusscanners are able to access your computer as well but we cannot...

It's so strange, Windows-update and many online virusscanners are able to access your computer as well but we cannot...

 

Windows updates use an ActiveX control I believe, you could also maybe achieve what you want with a Java applet. Either way, this board is for help with existing third party code.

It's so strange, Windows-update and many online virusscanners are able to access your computer as well but we cannot...

 

Windows updates use an ActiveX control I believe, you could also maybe achieve what you want with a Java applet. Either way, this board is for help with existing third party code.

 

I've found another way to reach my target:

 

I made a sharedir at my local windows machine and with an executable I am looking each 1,5 second (via a timer) if there is a textfile in this directory which consist the right msword (*.dot) or msexcel (*.xlt) and start this template... This is tested successfully.

 

Now I have a problem that I cannot write the textfile into \\ipaddress\templatehelp\......

 

even creating the file to the root of the server c:\ and copying it to \\ipaddress\templatehelp\*  is not working... :-( What's wrong with this?

 

 

Sounds like a permissions issue. Nothing to do with php.

 

I see, thanks for the advice, then I can continue seek to find the 'why' :-)

 

 

$datatowrite = 'tmpl.dot';

$fhdl = fopen('\\\\10.0.0.7\\App\\test.txt', 'w') or die("can't open file");

fwrite($fhdl,$datatowrite);

fclose($fhdl);

 

Why is this code not working?

When I use this line the file successfully is created:

$fhdl = fopen('C:\\test.txt', 'w') or die("can't open file");

 

 

note: 10.0.0.7 is not the webserver but just a workstation on the same router as the webserver

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.