Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    I have a macro which calls another macro within the same template to copy heading styles from another template using OrganizerCopy. When I run this macro on my C: drive, it runs without a problem. When I run it on a lan drive, I get a File in Use box stating the my destination file is locked for editing by (username).

    Any clue what is going on? I have no problem with the 2003 version of this macro running on a lan drive.

    Code sample:

    Sub AddHeadings()
    ' Copies Heading styles into document

    Application.OrganizerCopy Source:= _
    "C:\Program Files\Microsoft Office\Templates\HEADINGS.DOT", Destination:= _
    ActiveDocument.FullName, Name:= _
    "Heading 1", Object:=wdOrganizerObjectStyles

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    It's a bug in Word 2007. Microsoft suggests copying the document to a local drive, copying the styles into it, then copying the document back to the network.

    I also found a suggestion that the command works if the document is on a mapped drive instead of a UNC path. Since I don't have Office 2007 myself I can't verify that.

  3. #3
    New Lounger
    Join Date
    Apr 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Hans. I might have known it was a bug. It was driving me buggy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •