Solved

Running other application from Lotus Notes client

Posted on 2007-12-05
4
218 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

806 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