Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I presently only can do it by a custom sub ("macro"). As there are disadvantages using macroe, I hope someone else will know better advice. I also did not test if the document is actually and finally detached. I only tested that inserting the TemplateURL as a field after running my macro produced the emptxy text as intended. This is persistent over a store/reload cycle, however.

I presently only can do it by a custom sub ("macro"). As there are disadvantages using macroe, macros, I hope someone else will know better advice. I also did not test if the document is actually and finally detached. I only tested that inserting the TemplateURL as a field after running my macro produced the emptxy text as intended. This is persistent over a store/reload cycle, however.

The sub I sketched is extremely simple:

Sub DetachTemplate()
oProp = ThisComponent.getDocumentProperties()
oProp.TemplateURL=""
End Sub

I presently only can do it by a custom sub ("macro"). As there are disadvantages using macros, I hope someone else will know better advice. I also did not test if the document is actually and finally detached. I only tested that inserting the TemplateURL as a field after running my macro produced the emptxy text as intended. This is persistent over a store/reload cycle, however.

The sub I sketched is extremely simple:

Sub DetachTemplate()
oProp = ThisComponent.getDocumentProperties()
ThisComponent.DocumentProperties
oProp.TemplateName=""
oProp.TemplateURL=""
End Sub

I presently only can do it by a custom sub ("macro"). As there are disadvantages using macros, I hope someone else will know better advice. I also did not test if the document is actually and finally detached. I only tested that inserting the TemplateURL TemplateURL, TemplateName, and TemplaleStyle as a field after running my macro produced the emptxy text as intended. This is persistent over a store/reload cycle, however.

The sub I sketched is extremely simple:

Sub DetachTemplate()
oProp = ThisComponent.DocumentProperties
oProp.TemplateName=""
oProp.TemplateURL=""
End Sub