Jump to content
Macro Express Forums

Multiple Attachments Using One Variable


Cory

Recommended Posts

It's a rare day I get to contribute somethign new to the group instead of asking questions or sharing what many know so it's a happy day!

 

Macro Express has the capability of sending emails with multiple attachments but out of the box one needs to assign one string variable per attachment. To me this seemed inelegant as I hate setting aside large blocks of variables in order to accommodate an unknown number of attachments. After doing some experimentation I found that one can combine multiple attachments in one string variable by simply separating them with a semicolon. Using this method one can have any number of attachments without using up large blocks of string variables!

 

Anyway I thought some of you might find this useful so I thought I would pass it along.

Link to comment
Share on other sites

I agree with everything but your first sentence. We've all benefited a great deal from your input and ideas. You have my gratitude ... wait ... what was that? ... yes ... yes ... ok ... er, Floyd says thanks, too.

Link to comment
Share on other sites

Well thank you, that's high praise considering the source. But beleive me I get way more out of the forum than I put in! Thank you all!

Link to comment
Share on other sites

What’s it worth to you? If you like it you owe me a beer.

 

This is a subroutine macro I created. It feeds back using the registry.

 

 

<VARSR:01><CLEARVAR1:A:ALL><TBOX4:T:3:00LeftCenter000278000200:000:InstructionsBrowse to and select your files one at a time. When you are finished click on Cancel.><TVAR2:01:09:File to attach><REP3:08:000002:000001:0001:1:01:T1><TVAR2:02:09:File to attach><IFVAR2:1:02:1:><BREAK><ENDIF><TMVAR2:07:01:00:000:000:;%T2%><CLEARVAR1:T:2:2><ENDREP><REGWSTR:1:HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Miscellaneous\feedback><TBCLOSE:Instructions><VARSR:05>

Link to comment
Share on other sites

If you are ever in Cleveland, how does a party with a few kegs sound?

 

Really, I appreciate your macro, but I don't understand where the attachment names go and then what do I do with them? Do I use the macro e-mail? What's next?

 

A humbled and ignorant computer user,

 

Pat

Link to comment
Share on other sites

CLEVELAND ROCKS! Or at least they say that on TV. I've never had the pleasure as I’ve never had a need. But I am itching for an excuse to visit the Air Force Museum at Wright-Patterson AFB. I’m an air-fare war away from going just to see it but that’s a couple hundy miles from that keg, isn’t it?

 

Yeah this subroutine simply generates the string. Look at the string var I reference in the registry command after selecting a coupe of files. It will look something like T4-“c:ducati.jpg;c:mv-agusta.jpg;cagiva.jpg”. That’s it, that’s the whole ‘trick’. So now you just put %T4% or whatever in the attachment section of the email command.

 

I like sticking things I think might be used elsewhere into macro subroutines so I don’t have to try and extract them later and move all the vars around to get them to work in another macro. If you take the bit at the end about writing to the registry out and instead take the string variable out of there and put in the attachment section of the email command it will work flawlessly. I send out about 1300 emails just yesterday using it.

Link to comment
Share on other sites

Cory,

 

When you come to Ohio(wright Patterson) let me know. Don't forget because I always wanted to go there, but never did. I had buddies at Dayton U years ago, but never went to WP AFB.

 

Now I have one more thing that is unclear. If I had the chance to do things over again, I would have learned more about computers and programming. I still have time:). Here is the question:

 

When you say "If you take the bit at the end about writing to the registry out and instead take the string variable out of there and put in the attachment section of the email command it will work flawlessly. I send out about 1300 emails just yesterday using it. "

 

What do you mean?

 

I think you are referring to this line of code:

 

<REGWSTR:1:HKEY_CURRENT_USER\Software\Insight Software Solutions\Macro Express\Miscellaneous\feedback><TBCLOSE:Instructions><VARSR:05>

 

Gosh if I had more education on this..

 

I think you mean putting %T1% in the attachment line in Outlook, but can this be done more elegantly than having to open Outlook, open the attachment icon finding the contact in the address book etc. ?

 

I would assume that Macro Express is there to help by simplifying. How can this be done simply? If you send 1300 e-mails out, there's got to be a way to just make this massively simple even a cavman can do it(Geico).

 

Pat

Link to comment
Share on other sites

Thank you Kevin,

 

I put %T1% into the field for the attachments that I chose in "choose attachments now" and I tested one for myself and sent it to my own address and no attachments were attached.

 

I used the macro Cory built and then added %T1% to that area "choose attachments now".

 

Also, is there a way of bringing in a complete list(for example from Outlook) into Macro Express's e-mail address book without having to type it again?

 

Also, it appears that it doesn't show it as "sent" in Outllook(of which I have Yahoo) as the main recipient). Where is the history of it being sent?

 

Pat

Link to comment
Share on other sites

Macro Express contains a simple email client. You can use this client even if you do not have another email client such as Outlook Express, Outlook, Eudora, or Thunderbird installed.

 

The email addresses and the log of messages sent are within Macro Express itself. Click Options, Preferences, and File Paths to view the location of the files that contain the email addresses and the log of messages sent.

 

If you are having trouble with the attachments not being sent make sure that you are using the latest version of Macro Express. Earlier versions had some issues.

 

I also recommend that you put a Text Box Display command containing %T1% immediately before the E-mail Send command. This will allow you to view the content of the T1 variable to make sure that it contains the appropriate file paths. And, make sure you include the path to the files, not just the filename.

Link to comment
Share on other sites

Sorry, I’ve been 86 for a while.

 

I’ll definitely give you a ring when I go. My favorite cold war bomber the Valkyrie XB-70 is there and I simply must see it. It’s the last surviving example and an awesome sight.

 

Like Kevin said you use the email send command. He suggests using the log but personally I don’t like it. I has several limitations I find too… limiting. For instance the log viewer apparently only works from within ME and only looks at the current maillog file which means if you want ot keep records of different batch mailing you have to play the shell game. I’ve been meaning ot see if there was a way around this but I haven’t had the chance. A couple of workaround are:

1. Create your own log file. I just wrote a mass email macro for users and it takes all the variables used in the job and creates a tab delimited file of the results. This is also useful for when it blows up and you need to figure out where it left off.

2. You can put your email address or other external address like a gmail account in the BCC field. This way you know it went. If you send it to yourself you can set up a rule in OL to move the file to a folder besides your inbox for safe keeping.

 

To send a large email batch I use the ASCII file repeat command on a list of recipients. In Outlook I create a custom view so that contacts appear as a list instead of cards. I hate cards. Customize the view to show only the fields you’re interested in and copy it to your clipboard and paste it into a text file or Excel. When you paste it will be a tab separated values file (like CSV) that you can run ME on directly using ASCII File Process using the tab file option. Works friggin’ great!

Link to comment
Share on other sites

  • 3 weeks later...

Cory,

 

I followed your instructions to the letter, and I wanted to let you know that when sending out the attachments(to myself as a test), sometimes the attachments are there and sometimes they don't accompany the e-mail sent.

 

Here is what I have:

 

<VARSR:01><CLEARVAR1:A:ALL><TBOX4:T:3:00LeftCenter000278000200:000:InstructionsBrowse to and select your files one at a time. When you are finished click on Cancel.><TVAR2:01:09:File to attach><REP3:08:000002:000001:0001:1:01:T1><TVAR2:02:09:File to attach><IFVAR2:1:02:1:><BREAK><ENDIF><TMVAR2:07:01:00:000:000:;%T2%><CLEARVAR1:T:2:2><ENDREP><EMAIL2:Center:Center:Center:Center:Center:Center:RNR2S3A2%T1%;%T1%;T>

 

Can you tell why it is hit or miss with this?

 

Pat

Link to comment
Share on other sites

Don't forget this is a subroutine. It's designed for one to use to generate one variable and stash it in the registry. If you weren't going to take advantage of that it would look somethign like:

<TBOX4:T:3:00LeftCenter000278000200:000:InstructionsBrowse to and select your files one at a time. When you are finished click on Cancel.><TVAR2:01:09:File to attach><REP3:08:000002:000001:0001:1:01:T1><TVAR2:02:09:File to attach><IFVAR2:1:02:1:><BREAK><ENDIF><TMVAR2:07:01:00:000:000:;%T2%><CLEARVAR1:T:2:2><ENDREP><TBCLOSE:Instructions><EMAIL2:Center:Center:Center:Center:Center:Center:RNR1TOFred@somewhere.com|Fred@somewhere.com;S1Testing123A2%T1%;F>

Looking at you eMail command I see you have T1 listed twice. This is most likely the problem. You only need list T1 once. If that doesn't fix it send me some sample file names with path that don't work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...