G
George
Hi
In Word 2003 I had a couple of dot-moduls
I have used them as program- and/or AutoText-
containers. So I was able to f.e. insert a AutoText-
entry from one dot-AddIn into a document
which has based on another .dot-template.
In Word 2007 I have now the problem, that
I am only able to insert AutoText-entries from
the Template a document is based on.
X* = Template incl. path
Y* = Name of AT
When I use the line
Application.Templates(X*).AutoTextEntries(Y*).Insert Where:=Selection.range,
RichText:=True
I get runtime error 5941, saying the AT is not
available.
When I try it manually, it works.
When I do it manually and record a macro,
the following code gets recorded:
ActiveDocument.AttachedTemplate.BuildingBlockEntries(Y*).Insert
Where:=Selection.range, RichText:=True
When I start the recorded macro, I again get the runtime error 5941 ...
Does somebody has me a hint? Thanks for any help.
George
In Word 2003 I had a couple of dot-moduls
I have used them as program- and/or AutoText-
containers. So I was able to f.e. insert a AutoText-
entry from one dot-AddIn into a document
which has based on another .dot-template.
In Word 2007 I have now the problem, that
I am only able to insert AutoText-entries from
the Template a document is based on.
X* = Template incl. path
Y* = Name of AT
When I use the line
Application.Templates(X*).AutoTextEntries(Y*).Insert Where:=Selection.range,
RichText:=True
I get runtime error 5941, saying the AT is not
available.
When I try it manually, it works.
When I do it manually and record a macro,
the following code gets recorded:
ActiveDocument.AttachedTemplate.BuildingBlockEntries(Y*).Insert
Where:=Selection.range, RichText:=True
When I start the recorded macro, I again get the runtime error 5941 ...
Does somebody has me a hint? Thanks for any help.
George