OrganizerCopy and Templates on SharePoint

A

Art H

Word 2003 SP3 and SharePoint Server 2007

We have a Word template (.dot) on SharePoint and a new document is
created when clicking new as well as saved documents open in Word as
expected. Most macros in the template work--even those that use the
template's name except as described below. Please note that SharePoint
is new to our organization.

The template uses OrganizerCopy to copy selective styles on a as need
basis from the template to the active document. In the immediate
window, ?ThisDocument.FullName produces
http://drsproxy/CCI Template/Forms/Document Template.dot
and ?ActiveDocument.FullName produces
http://drsproxy/CCI Template/Art 2.doc
strStyle is part of a For Each loop where the needed styles are
defined in an array.

When the code snippet
Application.OrganizerCopy _
Source:=ThisDocument.FullName, _
Destination:=ActiveDocument.FullName, _
Name:=strStyle, _
Object:=wdOrganizerObjectStyles
executes, I get Run-time error '4149', File not found.

When using the template on SharePoint, Word does not seem to
understand a URL. How do I make this work?

BTW, the above code snippet works as expected when using the same
template on a file share.
 
G

Gordon Bentley-Mix

Art,

I don't have an answer for you but there *is* a SharePoint Server NG. If you
don't get an answer here, you might consider posting your question there.
Perhaps the SharePoint gurus will have an answer - especially since the
problem isn't specifically related to Word VBA (as you point out, the code
runs on a file share) but rather VBA running under SharePoint.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 

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

Top