last day (14 days later) » 

12:26
0
A: How do I make a macro reference a library?

nixdaPlease have a look at "VBA Early Binding" and "VBA Late Binding". You are using Earling Binding in this line: Set oFS = New FileSystemObject Thats why you have to enable a reference on every machine where the macro runs. You can convert Early Binding Dim oFS As FileSystemObject Set oFS ...

If you ask where the hell does that Scripting. does come from, let me confuse you with this.
I'm getting a "75 - Path/File access error" after replacing the lines...
The program stops after I press F8 with " MkDir (cTmpFld)" highlighted
My fault, I missed that named variable TemporaryFolder. See my edit for an explanation.
Will that numerical value be the same each time I run the macro? It's important for the macro to work wach time without midifications.
Yes, it will be.
12:26
Okay, thank you. Now after startup (before running the macro), the box "Microsoft Scripting Runtime" is ticked. Is this what should happen?
Hello again :)
Lets use the chat if you have more than one question or need further help
After you have done all the code changes you want to de-select "Microsoft Scripting Runtime" under libraries. Thats the moment when you get rid off "Early binding"
Thats what you want
Now your macro will run on every PC (because they don't need to enable that library from now on)
12:52
Okay, thank you. I'm sorry I'm at work, so I can't talk continuously, but I can keep this window open and post messages from time to time.
The macro works now! My only question is whys that box was ticked after startup. That was my problem all that time earlier...
I didn't want to stay ticked.
If you untick it and reopen your Outlook, it should stay unticked. not?
Are you in a company where domain policies re-enable that particular library for their own macros?
I've never heard that a library enables itself. Normally, it will stay unticked if you manually untick it once.
Okay, now it just asks me if I want to save the changes, and when I do, the box remains in the state I've put it in. It didn't do that before the code change for some reason, and it always unticked itself. But maybe I don't have to understand why that happened. :) Thank you very much!
I've accepted your answer :)
np

last day (14 days later) »