Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Eric Legault [MVP - Outlook]
 
Posts: n/a
Default Using .dot files over the Internet

Is there a way using client/server script or VBA to have a user click a
hyperlink to a .dot file stored on a web server and have a document created
based on that template?

I've tried script to automate Word from the server but get "ActiveX
Component cannot create object" even with Word installed on the server. I'd
prefer not to use client side script because of browser security setting
dependencies, trusted site requirements or requiring an ActiveX component to
be installed. It has to be simple and usable by a vast majority of regular
users.

Using IIS, I've ensured that the guest Internet account has rights on a
virtual folder containing the .dot file, and enabled Write and even Script
Source access in case some kind of extra permissions are required to launch
an instance of the template. That doesn't work either.

Heck, even choosing"Save As..." on a hyperlink to download a .dot file
causes the file to be downloaded as a .doc file! I've even embedded an
AutoExec macro in the .dot file:

Sub AutoOpen()
On Error Resume Next

Dim objNewDoc As Word.Document
Dim objOrigDoc As Word.Document

Set objOrigDoc = Application.ActiveDocument
Set objNewDoc = Documents.Add(Application.ActiveDocument.Name)

Set objNewDoc = Nothing
objOrigDoc.Close False
Set objOrigDoc = Nothing
End Sub

What this does on a .dot file NOT stored in a web server is to force the
creation of a document based on the opened .dot file and it then closes down
the originally opened .dot file. However, on a web server this causes the
..dot file to be opened as Read Only and the macro doesn't run (even if Enable
macros is clicked).

Ideally the solution would not involve downloading the .dot file, and a new
instance of the .dot file as a regular .doc file will be opened via the
simple clicking of a hyperlinked .dot file stored in a web server.

Any suggestions?

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Bob Buckland ?:-\)
 
Posts: n/a
Default Using .dot files over the Internet

Hi Eric,

It takes a little 'passthrough' trickery
http://support.microsoft.com/kb/278627/en-us?FR=1

=========
"Eric Legault [MVP - Outlook]" wrote in message
...
Is there a way using client/server script or VBA to have a user click a
hyperlink to a .dot file stored on a web server and have a document created
based on that template?
--
Let us know if this helped you,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends


Pricing and Packages for '2007 Microsoft Office System'
http://microsoft.com/office/preview


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Eric Legault [MVP - Outlook]
 
Posts: n/a
Default Using .dot files over the Internet

Thanks Bob. I've seen that article before and thought that would be
solution, however it only works when the client viewing the page containing
the link has access to the file via a file system or UNC path. If the
shortcut to the .dot file is created on a web server (for instance
c:\InetPub\wwwroot\test\mytemplate.dot.lnk pointing to
c:\InetPub\wwwroot\test\mytemplate.dot), then the shortcut will ONLY work on
that web server, not on another PC trying to access the shortcut from
http://webserver/test/mytemplate.dot.lnk.

Eric

"Bob Buckland ?:-)" wrote:

Hi Eric,

It takes a little 'passthrough' trickery
http://support.microsoft.com/kb/278627/en-us?FR=1

=========
"Eric Legault [MVP - Outlook]" wrote in message
...
Is there a way using client/server script or VBA to have a user click a
hyperlink to a .dot file stored on a web server and have a document created
based on that template?
--
Let us know if this helped you,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends


Pricing and Packages for '2007 Microsoft Office System'
http://microsoft.com/office/preview



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
document saved into temporary internet files ward76 Microsoft Word Help 1 December 20th 05 04:13 AM
word trys to open all files downloaded off the internet billiam Microsoft Word Help 1 December 8th 05 01:56 AM
.ART files from internet Metairie Page Layout 1 November 29th 05 11:32 PM
How can I find a word document in Temporary Internet Files Red Microsoft Word Help 4 September 19th 05 09:20 PM
Double-click default for .dot files JimJah Microsoft Word Help 2 April 8th 05 04:21 AM


All times are GMT +1. The time now is 01:22 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"