What line fails? Is it the line where you are using the swModel? If so I assume the model wasn't opened when you are calling OpenDoc6. Please check this by debugging the macro and see what error is returned by this method.
i'm sorry. the problem is already solved.
It had to take the location of the standard template, but there was no template at this location (sw2013 instead of sw2012).
Changed the link and it worked.
tnx for the help