Re: Macro misbehaving...



For starters, recording macros for something like this has a pretty good
chance of not being successful.

Apart from that, it is quite likely that problems are occuring because the
folder in which you are storing the templates is not a trusted location.

Further, if it is going to be used on computers running Word 2002 and 2003,
they are not going to know what to do with a .dotm template. You should be
saving your templates as Word 97-2003 templates if you want them to work in
those environments as well as in 2007.

Aside from that, it is not possible to give any further advice without
seeing the code that you have.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"USEN" <USEN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:93F2214D-5D4C-46BB-B2F8-FDF2A68A66BD@xxxxxxxxxxxxxxxx
I have Office 2007, but I've designed a template and a Macro for an
employer
who has people using both Word 2002 and 2003. Since it's for someone else
with a different versions of Word, I can't store it normally. Since I
don't
know the file structure of their computers, I figured it would be best to
just create a folder on my C-drive so that they can store it in the same
place when I send it to them. Here's the problem.

I've designed 2 templates. The first template needs to call up the 2nd
and
place the contents of the 2nd template at the top of various pages in the
1st
one. That's where the macro comes in. It inserts a page break then opens
the 2nd template, copies the contents and then pastes those contents at
the
top of the new page. I purposely instructed the Macro so save in the
normal.dotm file so that it could be run from any other file when the
keyboard shortcut is used. It works like a charm from within the first
template as long as the template itself is open. However, when I attempt
to
use the template as it is designed to be used...meaning that it opens a
copy
of itself in a temporary document (Document1, Document2, etc.), then the
Macro fails to work. I get errors stating that part of the component set
is
missing...the actual template that has opened a copy of itself instead of
the
original.

I've deleted and re-recorded this Macro so many times...but the results
are
always the same. What am I doing wrong? I have been trying to get this
done
for over 5 hours now. Is it because the documents are not being stored in
the folders that Word normally stores them in?

Can anyone please give me some suggestions?

Thanks!
USEN


.



Relevant Pages

  • Re: Folder Shortcuts / Word 2003 / Mail merge Fields / Odd Issue A
    ... you open has an AutoOpen macro that opens another document then closes, ... the template opened by Word on the rogue machine has an AutoOpen ...
    (microsoft.public.word.docmanagement)
  • Re: Folder Shortcuts / Word 2003 / Mail merge Fields / Odd Issue A
    ... > you open has an AutoOpen macro that opens another document then closes,> or ... the template opened by Word on the rogue machine has an AutoOpen ... >>> macro ...
    (microsoft.public.word.docmanagement)
  • Re: Custom Toolbar Editing Word 2002 & Migration to 2007
    ... It's a little tricky to open template files. ... otherwise, it just opens up a document based on the template (thus, the empty ... I do believe your situation requires editing the custom toolbar. ... To add entries, however, you need to link the entry to the correct macro. ...
    (microsoft.public.word.vba.general)
  • Re: Mail Merge Body of Text
    ... >> edit the template before mailing merging; all users are not supposed to be ... user opens word by double clicking file in browser, ... >> complains about macro, removes macro, user edits then saves, macro has ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Autorun Word Macro
    ... "Jay Freedman" wrote: ... What you're missing is that the macro must be in a _template_ (a file ... be accessed by an number of users) but have it so that when anyone opens ...
    (microsoft.public.word.vba.general)