View Single Post
 
Old 07-06-2016, 02:28 AM
thmsrox thmsrox is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jul 2016
Posts: 3
thmsrox is on a distinguished road
Default Creating a (shared!) file with CommandButton placing AutoText into the document

Hi,

I've been trying to create a document with CommandButtons that once clicked write the AutoText programmed into them. This works perfectly locally, but not externally.
The main issue is that I don't want other users to have to get a copy of my "Normal.dotm" file every time since it's too much of a hassle with the amount of AutoText used. The idea was to put just one copy of my Normal.dotm on a shared drive over the network and to have the code pull out that file so users would never have to swap around files on their PCs.

Something like this;

Quote:
Private Sub CommandButton21_Click()
'
' Bio Macro
'
'
Application.Templates( _
"S:\Thomas\Normal.dotm"). _
BuildingBlockEntries("Bio").Insert Where:=Selection.Range, RichText:=True
End Sub
This however does not work.
The original code does.

Quote:
Private Sub CommandButton21_Click()
'
' Bio Macro
'
'
Application.Templates( _
"C:\Users\Thomas\AppData\Roaming\Microsoft\Templat es\Normal.dotm"). _
BuildingBlockEntries("Bio").Insert Where:=Selection.Range, RichText:=True
End Sub
Ideas / help would be appreciated.
Reply With Quote