We want to execute a document macro after creating from template. Follwoing procedure is supposed:
- the document is created with class and format
- file is copied from template
- file is checked out
- macro CREATENEW should be executed!
The macro is not executed. Instead the file is only opened. (document process action is set for the class, document class has macros set, CHECKIN and CHECKOUT work normal)
The Debug log shows the following lines:
CreateDocFromTemplSet(Objkey='6FB1409321FB4B0AB9881F4B51C5E937')
GetDefaultValuesForNewDocument(LuName='EngPartRevision',KeyRef='PART_NO%3D0398028%5EPART_REV%3DR01%5E',DocClass='2057',LanguageCode='de',Format='A4',DocRev='A1',DocSheet='1',OnClassChange='NO')
CreateDocument
GetLocalFileName(DocClass='2057',DocNo='1000543',DocSheet='1',DocRev='A1')
GetMacroInfo(DocClass=null,DocNo='1000543',DocSheet=null,DocRev=null,Process='CREATENEW')
GetAttachmentCount(Lu …
…
With that Parameters for GetMacroInfo there is no macro found.
The question is now, why are the paramters DocClass, DocSheet and DocRev in the context have the value ‘null’.
Has anyone some hints for that?
Additional I have the question: Is it possible to disable the automatic document open function when creating a document from template?