View Single Post
 
Old 07-07-2016, 02:33 AM
thmsrox thmsrox is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jul 2016
Posts: 3
thmsrox is on a distinguished road
Default

Thanks for the help,

everything worked fine as you instructed, but only inside the template.
Once I load the template and use it as a document, when I click one of the CommandButtons it gives me the text-output from a different CB. After that no matter which other CB I attempt to click, nothing happens.

I have about 15 of these in the code behind the template.

Code:
Private Sub CommandButton210_Click()
    Application.Templates( _
        "V:\Folder\Filename.dotm" _
        ).BuildingBlockEntries("AutoTextName").Insert Where:=Selection.Range, _
        RichText:=True
End Sub
Works fine when I exit designermode in the template, works incorrect and broken when I load the template to make a standard document.
Reply With Quote