Solved

Running other application from Lotus Notes client

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Changing over from Lotus Approach v3 to MS Access 4 416
Lotus Notes Database "Invalid NSF Version" 5 2,047
Domino Server 11 72
Why the url within notes is no action 6 51
  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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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