Problems with InsertFile and AttachTemplate

M

medleyj_64119

My group has just upgraded from Word 2000 to Word 2002 (SP3). When I tr
to run certain macros word hangs on certain methods, specificaly
Section.InsertFile and ActiveDocument.AttachTemplate. By "hang" I mea
that when Word calls one of these methods Word freezes. The macro
these run in are stored in a template run as an add-in, and are fairl
complicated. What's strange is that if I record a macro with the sam
method, a macro that contains only a few lines, everthing works. Thi
problem is occurring in macros that have been used without problems fo
five or more years (some of them originated in Word 97).

Has anyone seen anything like this before? I've spent a couple of hour
doing searches on the the MS Knowledge Base and in this forum but hav
not turned up any answers.

Any help would be greatly appreciated
 
C

Cindy M -WordMVP-

Hi Medleyj_64119,

Well, the common factor that strikes me is that both of these methods are
accessing files. Are the files they're trying to access available? In a
network location? Security considerations? Might these files contain
macros or something else that could be triggering Word's macro security?
Mail merge documents with attached data sources?
My group has just upgraded from Word 2000 to Word 2002 (SP3). When I try
to run certain macros word hangs on certain methods, specificaly,
Section.InsertFile and ActiveDocument.AttachTemplate. By "hang" I mean
that when Word calls one of these methods Word freezes. The macros
these run in are stored in a template run as an add-in, and are fairly
complicated. What's strange is that if I record a macro with the same
method, a macro that contains only a few lines, everthing works. This
problem is occurring in macros that have been used without problems for
five or more years (some of them originated in Word 97).

Has anyone seen anything like this before? I've spent a couple of hours
doing searches on the the MS Knowledge Base and in this forum but have
not turned up any answers.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
M

medleyj_64119

"Are the files they're trying to access available? In a
network location?"

They are available on the LAN. I have two computers sitting
side-by-side running the same macros on the same LAN. This macro works
on the machine running Office 2000, but not on the machine running
Office 2002.

"Security considerations?"

As a test, I tried self certifying my macros on the 2002 machine
(Selfcert.exe). This did not improve matters. As it stands, I have word
set to the lowest security settings for macros.

"Might these files contain macros or something else that could be
triggering Word's macro security?"

These are simple word files that do not have macros in them.

"Mail merge documents with attached data sources?"

These are not mail merge documents. They do not have attached data
sources.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top