LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default close a pdf file opened via shellexecute

I am using the following code to open a pdf file.

Private 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

strFile = 'assume strFile is opening without issue

ShellExecute 0, "open", strFile, vbNullString, vbNullString, 0



how can I close the PDF file with vba script? Thank you in advance!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XL file opened using automation - how close? xp Excel Programming 2 May 27th 10 11:02 PM
XL file opened using automation - how close? Jacob Skaria Excel Programming 2 May 27th 10 10:16 PM
XL file opened using automation - how close? Jacob Skaria Excel Programming 0 May 27th 10 09:32 PM
XL file opened using automation - how close? xp Excel Programming 0 May 27th 10 09:11 PM
Closing a program which was opened with shellexecute JonT Excel Programming 1 February 27th 08 12:46 PM


All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"