Organizer copy in vba- temp location? Word2007

K

KAM

I am trying to copy styles from a template to whatever the active doc is.
Here is my code that has worked in past versions of Word:

MyDocName = ActiveDocument.FullName
With Application
.OrganizerCopy Source:=MainTemplate, Destination:=MyDocName,
Name:="_Document", Object:=wdOrganizerObjectStyles

Now when I try to run this is gives me a problem about my doc being read
only.

When I recorded the organizer manually, here is what it gave me for the
destination file:
Destination:= _
"C:\Documents and Settings\myusername\Local Settings\Temporary
Internet Files\Content.MSO\CDA11CE3.doc" _

When I have my destination doc saved to my C: drive, the code runs fine, as
soon as I save the doc to a network drive, it gives me the read only problem.

Any ideas? This template is going to customers who may save their files
anywhere. Also, this code worked fine in past versions of WORD!! Help.
 
T

Tony Jollans

I don't know exactly what restrictions there may be, but that isn't a
network drive - it is a temporary location where an e-mail attachment has
been temporarily stored in order that it can be opened. Changes to it
shouldn't be made; if you want to make (and keep) changes, save a copy of
the attachment to your local drive first and edit the saved copy.
 
K

KAM

Yes, that's why I thought it was a temp location problem. These files were
copied from an email - but are definitely located and being used from a
network drive. I do not even have the email open. I have closed Word and
re-opened. I have saved the file to C: and back to the network and the same
thing happens.
 
K

KAM

I am glad I am not crazy! I am trying to switch a template over to work with
Word2007 and I am not all that familiar with Word2007 yet.

Any one else have any ideas??
 

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