Simple submitting

T

Travis Lauricella

I'm not an "official" programmer, but for the last seven years I've
tinkered with Word and Excel's VBA enough to become pretty proficient
at submitting them through Outlook to other users. My preferred
method was Word's routing slip (edited to save space):

ActiveDocument.RoutingSlip.AddRecipient "(e-mail address removed)"
ActiveDocument.RoutingSlip.Subject = "Some subject"
ActiveDocument.Route

When this wasn't possible, I used MAPI calls (again, edited to save
space):

ActiveDocument.SaveAs cstrFileName
Set objSession = CreateObject("mapi.session")
Set objMessage = objSession.Outbox.Messages.Add
Set objOneRecip = objMessage.Recipients.Add
objOneRecip.Name = cstrRecipientName
objMessage.Subject = cstrSubject
objMessage.Text = ActiveDocument.FormFields("somefield").Result
Set objAttachment = objMessage.Attachments.Add
objAttachment.Type = 1
objAttachment.ReadFromFile cstrFileName
objAttachment.Source = cstrFileName
objMessage.Update
objMessage.Send

A method that I never use, because of the need to keep the form and
data integrity once the user clicks the "Send" button, is to do a
simple ActiveDocument.SendMail, because that gives the user the
opporunity to mess with the attachment (or inline text) after the
validation is done.

I'm really excited about the capabilities of InfoPath, and am trying
it out today for the first time. I know nothing about Web Services,
although I've poked around a little bit at our CDONTS server. The
only effective custom script I've been able to find was the one Andrew
Watt posted here back in April:

var objEmail;
objEmail = Application.ActiveWindow.MailEnvelope;
objEmail.To = "(e-mail address removed)";
objEmail.CC = "(e-mail address removed)"
objEmail.Subject = "The user must choose to send this";
objEmail.Visible = true;

Unfortunately, this displays an XML attachment and and editable HTML
representation of the form in the Outlook message before the user
chooses "Send" in the Outlook window.

I guess what I'm really looking for is a way to click an InfoPath
"Submit" button to send the InfoPath file to "(e-mail address removed)",
without giving the sender an opportunity to edit it between clicking
"Submit" and the time it's sent. (Yes, I know they could delay
Outlook's sending, and plenty of other ways, but my goal is more to
protect curious users from themselves, rather than true security.)
I'd appreciate any ideas you've got.

Travis
 
I

Inbar

You can send an InfoPath form by email. The Files->"Send to mail receipient"
feature allows you to do just that. Is that what you were looking for?
 
T

Travis Lauricella

Inbar said:
You can send an InfoPath form by email. The Files->"Send to mail receipient"
feature allows you to do just that. Is that what you were looking for?

Nope. No luck. The form is still showing as an XML attachment
attached to a bunch of inline (HTML?) text, representing the form and
its editable data.

Travis
 
T

Travis Lauricella

What I'm hoping for is something like you can do with the RoutingSlip
in Word VBA -- it's not that I don't want to send the data, rather,
I'd like to send data that's not easily editable by a novice user.

The RoutingSlip in Word VBA sends the Word document as an attachment,
with no intervention from the user other than clicking a "Send Form"
button I've written into the form, and mutiple clicks of "yes" to get
past Outlook security. I'd like to do something similar with the XML
data file, but not the rest of the form.

(If I understand correctly, an InfoPath form could be stored on our
shared network drive, so if we can get users to automatically route an
attached "someform.xml" data file around, the the recipient can open
the data file into Infopath. If I understand correctly, the data file
has a now-embedded link to
file:///\\someserver\somedirectory\someform.xsn which allows the data
to open into the correct form.)

Signatures aren't an option at this time because of the administrative
overhead necessary, although if there were a way to tie it into our NT
server authentication...

Nah... that'd be too cool.

Travis
 

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