Opening recorded macro's on a different pc

F

FlyingFishstick

Hello,

I'm making some kind of a template where a user can add certain text
files into the word document. It's the first time that I work with
macros and I managed to get the list of recorded macros in the word
taskbar.

When somebody downloads the template from the server on another
computer and tries to run one of the macros the system can't find the
text files, although I've grouped them in the same folder as the
'template'... Sometimes it works and sometimes it doesn't... Can
somebody help me with this please? (When I run a test I always set
security to 'medium' on the other pc so that's not the problem...)

thx!
 
J

Jezebel

You can't create serious macros by recording them; certainly not macros of a
standard that you'd want to provide to others. Apart from producing
seriously lousy code, the macro recorder is, for most purposes, specific to
the context in which it was first used. Which is why the code often won't
work on other occasions or on other machines.

If you don't understand VBA well enough to look at the code and understand
it, don't even think about distributing your macros.
 
C

Cooz

Hi FlyingFishstick,

Check your code to see if it contains the right path to the text files
(select your macro and choose Edit). If not, modify it.

Good luck,
Cooz
 
F

FlyingFishstick

Hi!

thanx for your help. Indeed, I've written the complete path name
(before VBA showed only the filename) and now it finds them.
I'm not logged in via Microsoft...
 
C

Charles Kenyon

You might want to look into AutoText, which could keep the text in the same
template as your code.
(Since you can put AutoText on a menu, it might even make the code
unneeded.)
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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