Complete Noob Here - Outlook Form - Concept

G

Guest

Here in Kuwait, we are moving all kinds of cargo in and out of theater (as
you might imagine).

I took over this post a few months ago and found that I was quickly mired in
paper (creating, processing, storing, etc...)

One aspect of what I'm trying to change seems like a wonderful candidate for
a custom outlook message form.

Here's the parameters:
1. The email body contains several defined fields that I have already set
up and it works ok.
2. Clients need to be able to attach a few files of different types to the
email - I've been able to get that to work as well.

Here's where it gets weird:

3. I have a command button that needs to do the following:
a. Open a file picker type control that lists only those files attached
to the email.
b. Once the file is selected, the targeted file is opened and parsed
according to logic already developed (though tremendously inefficient I'm
betting), with the data from each of the fields on the email form appended to
each line of the parsed file.
c. Once done, the file needs to be saved as a Tab delimited text file and
attached to the message form.

I can provide samples of the text files, the forms as they exist to date,
and the parsing logic - whatever you need.

To someone who can help me with this I can offer only my thanks and probably
a Certificate of Appreciation from my Col and a Command Coin.
 
S

Sue Mosher [MVP-Outlook]

There are some prerequisites to making a custom message form work. Before you start designing, work down this check list:

1) All people using the form -- both senders and recipients -- work inside the same organization and use Outlook for mail, not Outlook Web Access, but the Outlook that comes with Office.

2) You have permission to publish a message form to the Organizational Forms library on the Exchange mail server. Or, you are dealing with a small enough group of users that you can get each of them to publish your form to their own Personal Forms library.

If you have those, then you can tackle your task #3. I'd do it by putting come in the form's Open event handler to populate a list or combo box with the names of the file attachments. You can then have a command button on the form to do whatever you need to do with the file that the user selects. Remember that the only thing you can do with an attachment in Outlook is save it as a file. Once you save it as a file, you can use techniques appropriate to that type of file to work with its data. For a text file, a good choice is the FileSystemObject library; see http://www.outlookcode.com/d/vbscript.htm#fso .
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

1. Thank you so much for your time, if we can get this to go, it will save
us much time and headaches.

2. On your points 1 and 2, I have checked with our S-6 (thats Army slang
for the Command Staff Combat Geeks) and verified that item your item 1 is
satisfied. On item 2, I have to present buy-in from the players and our
Commander, plus a project file containing samples, functional specs, and
source code for their security inspection and approval. This is not a
problem, I can do that.

3. On your point three, I'm not certain if you intended this - but you
caused me to rethink part of my flow process. Instead of having the TC/AIMS
personnel (those who would create the message and actually attach the files
and send the message) fire the code that would process the file, I can have
the code on the read page and have the recipients do that processing.

Additionally, you mentioned that the only thing Outlook can do with a file
is save it as a file. Does that mean code embedded in the form cannot open
the file, parse it with the additional data from the form and then save the
file with a different (user specified) name?
 
S

Sue Mosher [MVP-Outlook]

No, it just means that the code to process the file isn't Outlook automation code. It may be code running behind an Outlook form, but it's using programming libraries other than Outlook.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Ok, I just wanted to be certain of the implication.

BTW, Mr. Kevin Lundquist says hello. He says you helped a few years ago
when he was in the Army and working on a form.
--
SFC Charlie Cox
595th/1189th Call Forward NCOIC
"Ex Chaos Ordo"
 
G

Guest

Ok, this is now officially kicking my bahawmpuss (a southern term unique to
Down-Easters in North Carolina.

Anyway...I'm thinkng my logic for all this is fouled up and that's why I
can't figure out how to do what I want to do. (Dismissing of course the very
real possibility that when it comes to stuff like this I'm little more than a
babbling idiot - perhaps not even babbling)

Let me try a different tack.

I can select the attachment and save that where I want, no problem.

I can save the email itself as a text file where I want, no problem.

How difficult would it be to get outlook to combine the two (appending the
text version of the email data to the attachment file) and then save the
combined file?

Does that make any sense to you? Then I can use the Excel logic I've
already developed to parse the data.
 
G

Guest

Ok, this is now officially kicking my bahawmpuss (a southern term unique to
Down-Easters in North Carolina.

Anyway...I'm thinkng my logic for all this is fouled up and that's why I
can't figure out how to do what I want to do. (Dismissing of course the very
real possibility that when it comes to stuff like this I'm little more than a
babbling idiot - perhaps not even babbling)

Let me try a different tack.

I can select the attachment and save that where I want, no problem.

I can save the email itself as a text file where I want, no problem.

How difficult would it be to get outlook to combine the two (appending the
text version of the email data to the attachment file) and then save the
combined file?

Does that make any sense to you? Then I can use the Excel logic I've
already developed to parse the data.
 
S

Sue Mosher [MVP-Outlook]

Gee, I never heard that one in all the time I spent in Morehead City/Beaufort. <g> Say hey to Kevin for me.

Back to your attachments issue: The devil is in the details, and the details in this case are -- what kind of file is the attachment? If it's a text file, it's a pretty simple operation to use FileSystemObject methods (http://www.microsoft.com/technet/scriptcenter/guide/sas_scr_xfxi.mspx) to append to a text file. In other words, it's not Outlook that has methods for combining text data, it's FileSystemObject. And you can automate FSO in Outlook code just as you can automate Outlook or Excel or any other application with a programming library.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

I guess the difference is the way down-easters define themselves. If you
live East of the bridge, anyone living West of you isn't down-east. I picked
up that word spending a few days on a commercial shrimping boat learning a
little about the life of a commercial shrimper.

Back to the the stuff...the files are text files, but usually come with a
different extention name, but I doubt that's a problem. I'll give it a try
later today.

Thanks for your help.
 
S

Sue Mosher [MVP-Outlook]

Thanks for the vocabulary lesson! The extension on the files won't matter. You should be good to go once you get the hang of working with FSO, which is pretty straightforward.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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