View Single Post
  #7  
Old October 13th 07, 03:41 PM posted to microsoft.public.outlook.program_forms
Will
external usenet poster
 
Posts: 55
Default Open File from Command Button

Sue,

Is it possible to program a command button to launch a Word document with
fillable data fields in the document and, once the user has completed filling
in the fields, they close the document and the document is saved in the
Contact Notes field?

For example, an employee at a remote site navigates to our functional
mailbox and to the Incident Report folder. Clicks on NEW POST. In the
folder, we would create a custom POST form in which the employee fills
standard reporting data, then clicks a button launching a Word document in
which they complete their detailed report.

Conversely, I'd like to program a button to launch a Word document and
populate fields in the document with data the user enters into the Contact
page. In this example, an employee navigates to our Public Folder in which
there is a Contact folder containing employee data. The user goes to a
custom page in which the employee enters R&R request data. I need a button
on page 2 that would send the request data, (dates, specific airline
carriers, frequent flyer numbers, destination, etc), to the individuals
supervisor. The supervisor, in turn, will have a button to APPROVE the
request. When the APPROVAL even is activated, the supervisor's signature
file will be applied to the document. The employee can then click a button
on their end which would print a pre-designed document with fields populated
from the form along with the signature of the supervisor.

That's a lot.

I'm buying the book... but I'd like some guidance.

Thanks!

C

"Sue Mosher [MVP-Outlook]" wrote:

Since it's a Word file, you can use Word automation, along these lines:

Sub CommandButton1_Click()
strPath = "G:\Information System\Electronic Communications Policy.doc"
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(strPath)
objDoc.Activate
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"taborp" wrote in message ...
I have created a custom form, but would like to set a command button to open
a Word file located in a network folder. The path to the Word file is
G:\Information System\Electronic Communications Policy. I know I need to
start with Sub CommandButton1_Click(), but then do not know what else to
enter. Can anyone help? Thanks.


Ads