[AccessD] Access 2013 - open WPS files?

Stuart McLachlan stuart at lexacorp.com.pg
Sat Oct 3 01:04:31 CDT 2015


You can open any file which has an assocated application from within Access.

As long as the .wpd (or whatever) extension is associated with WP, just pass the full file 
path/name to the function below and it will open in WP. 

'Best to place this declaration in a stand alone module
Public Declare Function ShellExecute Lib "SHELL32.DLL" _
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


'I oftern call the following function from the DoubleClick event of a textbox which shows the 
filename. 

Function OpenFileInApplication(Filename as string) as long
'Opens any file in its assocated application

 If (Dir$(Filename) > "") Then
       ShellExecute Application.hWndAccessApp, "Open", Filename, "", "", vbNormalFocus
   Else
        MsgBox FileName & " not found!"
        OpenFileInApplication = 1 
    End If

End Function

-- 
Stuart

On 2 Oct 2015 at 12:22, Tina Norris Fields wrote:

> Hi Gang,
> 
> Still working on a database for a law firm. They would like to open
> certain WordPerfect files from inside Access.  Can Access do that, or,
> do I have to convince them to convert the wps files to doc or docx
> files?
> 
> Thanks,
> TNF
> 
> -- 
> Tina Norris Fields
> tinanfields-at-torchlake-dot-com
> 231-322-2787
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list