How would I define the path? I see that the path is associated with the email so in my naivety I'm assuming that KM has to gather that data from the item in question. I don't know how to get the path data and then define the variable.
Is there a method in KM Editor to capture the image of a full macro before its uploaded to this forum? To comply with your good suggestion I wanted to upload a working macro and a non working macro but that would need some redaction before posting.
The answer to your question is the email's path. Apologies for the lack of clarity. I truncated the section dealing with saving to pdf so in the example image I posted the only function is to remove the tag "alert" from the target email.
Thanks for the pointer regarding getting the image.
I'll post a couple of images of working and non working examples that I'm using.
I can only say that the "success" example I posted (apologies I didn't post the macro) works perfectly . I use it monthly and have done for a few years. So in my naivety I can't explain why it works, but it does. I have a few other variants of the "success" macro and they work perfectly.
With regard to tags assigned to an email. I use "Mailtags". I suppose you might term it a plugin for apple's Mail application. Once again I can verify that for the "success" macro posted and for a number of other macros I can add and remove tags using the code shown in the example I posted.
It's always delightful when someone delivers a surprise to one of the wizards here. They are human after all. But we haven't seen both sides in full detail yet so it's not perfectly clear who might be right here.
Don't worry about being out of your depth. I'm often out of my depth too here. It's still a good place to be. You've been perfectly polite so there's nothing to worry about. You've got one of the wizards helping you so an answer should be forthcoming.
Since I'm a latecomer here to this thread I'm not sure if you posted the working macro in an older post above or if you are still planning to post it.
Thanks for your response and encouragement.
It's entirely possible that what I have is only working by some fluke but whether its a valid approach or not I can verify that it does work. I've used it hundreds of times and it always produces the correct result with the emails correctly tagged and sent to the archive. And, the pdf export arrives in the correct folder (where it is subsequently processed by Hazel).
Alright. So your question is why are some of your macros giving you the error "Can't find Folder Path". And you say this last one doesn't give that error.
What you did (to help us) was show us some "working macros" that are very similar to your non-working macros. Looking at your working macro may not tell us why your non-working macros aren't working.
One time I told my doctor that my left ear wasn't working properly and he immediately looked at my right ear. I said "Doctor, that's the wrong ear." He said, "I know, I just want to establish a baseline first."
So sometimes having a baseline can be useful. I'm not sure it's useful in this case. In this case my approach would be to look at the failing macro. It seems that you posted a very trimmed down version of the failing macro at the top of this thread, and a less trimmed down version of a working macro near the end of the thread. (But there doesn't seem to be a less trimmed down version of the failing macro anywhere - the one that gives you the "can't find Folder Path" error.)
We totally accept the fact that you must remove personal information from your macro especially financial information, and perhaps people's real names. But it can be problematic if you don't tell us which actions you edited out personal information from. My guess is that you edited out information from your directory path. But if I guess the wrong thing it may be impossible to find the solution.
Since your original post was asking about a "Can't find Folder Path" error, would it be possible for you to post a minimally trimmed down version of that macro? Ie, the one that we're trying to fix?
If this is frustrating, I apologize. If you do edit out any actions to remove personal information, that's fine, but can you tell us which actions you edited? Because there's a very real possibility that the stuff you edited out is the very stuff that's causing the "Path Not Found" error.
I "attempted" to post the macro but it would appear the system got the better of me.
I couldn't see how to insert the macro into the current thread, I'm sure there must be a way.
Anyway I posted the macro to a new post and attempted to link to it but the post isn't appearing on the site so perhaps some clever software monitor didn't like it because I used the same title as my first post. I'll make another attempt to post the macro.