Opening Word Template containing script from Public Folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,

I have a Word template which has a script embedded in it. The script was
written by our application services department in the native language of Word
(VB?). The purpose of the script is to lock out previous entries in the
document and indicate the time/date along with the users name modifying the
document. The template/script peforms properly when accessing it via the
local workstation. After posting the template to an Exchange public folder,
it loses its functionality. In the test environment, I've installed Outlook
on the Exchange server (believing that certain components were needed from
the office sutie to execute the script properly). However, that has not
rectified the situation. I do not wish to install Word on the production
Exchange server. Is there a switch that needs to be turned on in order to
get this to work? Environment is Exchange 2000 SP3 with W2K SP4 on HP Dual
Xeon box. Any help would be greatly appreciated.

Thks,
 
The template is opening on the client. Installing Outlook on the server has no bearing on the matter and is an unsupported configuration, in short, a bad idea.

When you say the template has script embedded in it, what precisely do you mean? That it contains VBA macros (which are not scripts)?

Note that a Word template in a public folder will not function like a ..dot file on a network share. When users open it, they'll see the .dot file, not a new document .doc file using that as the template. So if they created an AutoNew() macro, it won't fire. Furthermore, I don't think an AutoOpen() macro on a .doc file in a public folder will fire either.

If the purpose of this application is to use a Word template stored in a public folder to create new documents, a better approach might be to use a custom form that contains the template as an attachment. Code in the form's Item_Open event handler could:

a) Save the attached .dot file to a local file folder (Attachment.SaveAsFile method)
b) Start Word (CreateObject("Word.Application"))
c) Create a new Word document from the template (Documents.Add method)
 
Sue,

In regards to your question, the template contains VB macros (I apologize
for the confusion with the terminology). To further clarify your response,
you indicate using a custom form that contains the template as an attachment.
That's an Outlook custom form, correct?

Thks,

Eric
 
Yes, that's how I'd approach this scenario -- with a custom Outlook post form.

I was specifically curious about whether the .dot file had AutoNew or AutoOpen macros.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks a lot for your solution suggestion. It does make a trick when it comes
to the distribution of the template. The problem however still exists, as we
want to keep saved word document, created with the template, in the exchange
folder, but keep macro functionality. We need each change to the document to
be supervised by the macro. Should i try to post it to the exchange as a post
with word attachment or you have additional suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top