Solved

Running other application from Lotus Notes client

Posted on 2007-12-05
4
216 Views
Last Modified: 2013-12-18
I am looking for some Lotus script which can run other application like Microsoft Word, Excel, Calculator, Oxford Dictionary (that I have installed in my system) etc from my Notes Client Work place.

My network environment is Windows 2000 Server, XP Professional Clients, Domino R5 and Notes R5 Clients.

Thanks in advance.
0
Comment
Question by:mekh
  • 2
4 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 20418697
You only want to start those applications, or do you also want that Notes interacts with the application?

Starting an application is not so complicated. In LotusScript there is the function:

ShellShell("application")

In formula language, there is the Execute-command:

@Command( [Execute] ; application ; nomsFichiers )
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 20420830
If you want to launch a file (say a Word document) using it's associated program (MS Word), then you can use this code.  It only works in a Windows environment, though.
Declare Function W32_GetDesktopWindow Lib "USER32" Alias "GetDesktopWindow" () As Long

Declare Function W32_ShellExecute Lib "SHELL32" Alias "ShellExecuteA" (Byval hwnd As Long, Byval lpOperation As String, Byval lpFile As String, Byval lpParameters As String, Byval lpDirectory As String, Byval nShowCmd As Long) As Long
 

Public Function FileView(Byval filePath As String) As Long

	

	'/**

	' * Displays a file using the OS-defined application.  Win32 only.

	' * @param filePath The path to the file to open.

	' * @return Returns the handle to the appplication 

	' */

	

	Dim hDC As Long

	Const SW_SHOWNORMAL = 1

	If (Not IsDefined("WIN32")) Then

		Dim sess As New NotesSession()

		Msgbox "Unable to view file.  The " & sess.Platform & " is not currently supported." & MSG_ERROR_HELPDESK

		Exit Function

	End If

	hDC = W32_GetDesktopWindow()

	FileView = W32_ShellExecute(hDC, "Open", filePath, "", "c:\", SW_SHOWNORMAL)

	

End Function

Open in new window

0
 
LVL 2

Author Comment

by:mekh
ID: 20432957
Hi Bosman;

Could you elaborate your answer?

Thats what I am looking for.

Hanson: I am not only specific to Microsoft application but any other application that I want to run.

Thanks

0
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 125 total points
ID: 20441363
Did you read my answer?  The point of the code is that it works with any application.

If you want to open "C:\readme.txt" in Notepad (or your default ".txt" editor) you call:

      FileView("C:\readme.txt")

If you want to open "C:\index.html" in your default web browser, you call:

      FileView("C:\index.html")

If you want to open "C:\report.doc" in Wordpad (or MS Word if it's installed), you call:

      FileView("C:\report.doc")

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now