Re: Application.OrganizerCopy: it is a bug



In the meantime I have got an official answer from MS-Support Germany.

It is a bug. But Microsoft does not offer a fix -:(
They suggested to copy the document to the temp-folder before using the OrganizerCopy command. I dont't think that this is a good solution.

Regards
Karl.



"Karl Zuern" <Karl.Zuern@xxxxxxxx> schrieb im Newsbeitrag news:190C44EB-68D7-49D6-8B11-B119D1A009B0@xxxxxxxxxxxxxxxx
Hi,

I would like to copy a format-template from a DOT-File into the ActiveDocument.

In Word 2003 the folling VBA-Code works fine:

-----------------------------------------------------------------------------------------------
Sub TestOrganizerCopy()
source1 = Options.DefaultFilePath(wdProgramPath) & "\StartUp\DATA5.dot"
destination1 = ActiveDocument.FullName
Application.OrganizerCopy Source:=source1, Destination:=destination1, Name:="AbsatzNummer", Object:=wdOrganizerObjectStyles
End Sub
-----------------------------------------------------------------------------------------------

In Word 2007 this code works also fine, but only if the ActiveDocument is stored on the local filesystem.
If the ActiveDocument is stored somewhere on a fileserver the code produces a error that tells you, that the active document is already open.
The system seems to block itself.

Does anybody know a solution, how to solve the problem?
Thanks for help.

Regards
Karl Zuern / DATA 5 GmbH



.



Relevant Pages

  • RE: Word User Form "grabbing" active instance of Word
    ... template, then ThisDocument is the module your code should be in. ... Activedocument because if as part of an error situation the new document ... subroutine since all it does is exit the sub. ... AnForm can't be set to nothing ...
    (microsoft.public.word.vba.general)
  • Re: Duplicate data on First document and No data on the Second doc
    ... Sub openMedHistory(ByRef PFName As String, ByRef PLName As String) ... Do not use ActiveDocument, ...
    (microsoft.public.word.vba.general)
  • Re: Listbox not working on Mac
    ... replace the 'me' in the document code with 'activedocument' when they are ... 'me' that is used in a userform dialog or a ThisDocument module because it ... I played around with this Sub test() on my MacWord... ... And it might work in a Project "Class Modules" folder code, ...
    (microsoft.public.word.vba.userforms)
  • Re: Copy a paragraph style from template to document
    ... original message more closely, you would have noticed that I had substituted ... style from my normal.dot to the active document. ... ' CopyDefinitionPara Macro ... ActiveDocument - but that didn't work either)- Hide quoted text - ...
    (microsoft.public.word.vba.general)
  • Re: Automatic Date and time in word document title
    ... Dim fname As String ... With ActiveDocument ... Sub FilesaveAs() ... It also pops up a window asking to 'Enter the filename', ...
    (microsoft.public.word.docmanagement)