Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VSS/ Shell Application


I’m trying to work out a few things about Visual SourceSafe and one of them is this. If I want to send a shell application, after bringing it to a stable state (after having developed the shell app.), to a team at another location for final development do I create a separate Visual SourceSafe database and then ship the database file to the other location? Or, do I use the Pack. & Deployment Wizard from within SourceSafe to create a master copy when I’m done and ship that to the other location? Or do I do something else?

Can you help?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Shell.Application
Thanks for reading my problem, here it is:

I am using using the shell.Application object in my script to open a browser, i can select a folder and click 'OK' and the path is returned in MYFolder. But if i select 'Cancel' at any stage i dont get a return and MYFolder is not set to anything!! The next part of the script needs to check MYFolder to see if it has been set, but any time i reference MYFolder after the 'Cancel' button has been pressed i get an error message 'Object is not set' which is understanable because it hasn't, but, how can i check MYFolder to see whether it has been set ?


set MYShell = CreateObject("Shell.Application")
set MYFolder = oShell.BrowseForFolder(0, "Select Directory", 0)

if MYFolder <> "" then

Msbox MyFolder

End if

Shell And API Application
Can anyone help me with this? I'am creating a program that will run an application which I called using shell, and what I want to do is to know if the shelled application is normally terminated or terminated due to error. Is there any way to know the return value of an application when it terminates?

Shell.application
Hi all,

I am using an automation class Shell.application in my VB script to create an instance of Windows Shell Object for using the Windows browseforfolder method .I am not able to run this script in Windows NT machines where this service is not available.Installing IE 4 with active desktop shell update release enabled during the installation will fix this problem.But now i cannot do this in all the machines.So can someone help me in finding another way to implement this.

Thanks

Why Shell Will Not Hide Application??
i used these codes to launchand hide windows calculator but it won't hide[:-banghead](even though it works fine with notepad for example:


Code:
ShellExecute Me.hwnd, vbNullString, "calc.exe", vbNullString, vbNullString, SW_HIDE
and

Code:
shell "calc.exe",vbHide

??? can anyone help?

Opening Application Without Shell
Hi,
is there anyway to opena application..........so that they open in thier default extensions.......whithout specifying the application which should open it

regards
vivek.s

Launching Application From VB6 By Shell
Dear All
I need to run a paging programmer application inside my Visual Basic 6, application,
I am using Shell command as below;

dim retVal
retVal = Shell ( "C:Programminh...Elf.exe",vbMaximizedFocus)
AppActivate retVal

The application runs perfect but the problem is, when the application lauch, it can not find parallel port. But when I run the application out of my VB6 application, It works fine,

I know there is another command in VB6 to launch external application but I can not remember,

Can anybody help me please,

Regards

Behnam

Help With 'shell' && Opening Another Application
Very new to VB. We use Microsoft Project extensively and my boss wants an automated input screen to track what changes have been made and when. Trying to make it idiot proof so people can't forget.

So far the only thing I've been able to come up with is a msg box upon opening/saving/closing etc.

I've been trying to use the shell command to open Excel upon opening of Microsoft Project and prompt for input, but keep getting an error. I read something about needing a command for it to loop until Excel opens, but haven't had any luck so far. If anyone can offer any advice it would be immensely appreciated.

Thanks -

S

Tracking Shell Application
Scenario :
-----------
I am lanching an application through a VB Form on a button click.

Requirements :
---------------------

1. Can I know in my VB form whether the application launched is closed by the user or not ? Is some notification mechanism available

2. Can I launch this application in synchronous mode in any way, ie. I want that until and unless the launched application is closed , the control should not return to my VB Form, a sort of Modal Dialog behavior is required.

Some sample or links would be appreciated.
Waiting for some valuable Suggestions

Thanks in advance
Santosh Thankachan

Resize Application That's Open By Shell?
Hi there,

I use Shell to open another application and I want to change the size and possibly move that window to the corner of the screen. The trouble is the Shell does return a handle, but I don't know what to do with that handle so that I can GET the window and change it.

I have tried function like GetWindowThreadProcessId and GetWindow but they don't really do anything helpful.

Could anyone point me to a right direction here? Any help would be much appreciated!

Thank you

Close External Application Using SHELL ?
Hi all
It seems easy enough to open an application using the SHELL command eg.
ChDrive "c"
ChDir "c:program filesdbcesignal"
Shell ("c:program filesdbcesignalwinros.exe")

However, how do I close winros.exe down again ?
Thanks in advance......


"..he looked at the clock & saw that it was 11:11, how odd.."

Changing Default Shell Application
Hi, good day everyone.
I tried changing the default shell of my PC. I changed
"HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon" i set Shell=MyApp.exe instead of the default which is Explorer.exe. I made this change because i want my application to run before the windows explorer. Then when my app closes, it will shell windows explorer for normal use. My problem is that when i run Explorer.exe form my app, windows explorer didn't run normally. It only showed an exploer window. No taskbar or desktop items shown. How can i fix this?

Run Unix Shell Scripts From VB Application !!!
Hi all,

I need to run shell scripts on a Unix environment, does anyone know what to do this from a VB application ?

Please let me know.
Joao.

Is Shell The Fastest Way To Load An Application?
Is Shell "...." the fastest way to load an application?

Shell.Application ActiveX Error
I am attempting to use the following lines of code:


Code:
set objShell = CreateObject("Shell.Application")
objWSHShell.Open "C:MSAInvoice.htm"


To open an HTML file when the user clicks a button on an Outlook Form. On one computer (Windows XP, Outlook 97) these lines of code worked great. On Another (Windows 98, Outlook 97) they also worked fine.

Problem is, many of the clients using this form are running Windows 95 and Outlook 97 or 98. When the code runs we get an "ActiveX Cannot Create Component Shell.Application" error message. Internet Explorer 5.5 is installed on the machine, and I have specifically installed Windows Scripting Host 5.1, but am still receiving the error.

Does anyone know what I'm missing? Thanks!

--Ben Finkel

Using SHELL To Open A Console Application
Hi all,
I'm creating a little VB app that runs a dos program using the shell command. The trouble is, this dos program terminates just as quickly as it starts. This means you don't have enough time to read what was said in the console window. To solve this problem I figured I should program my app to create a batch file with the command: pause at the end. This does work, but it's a little messy. I was wondering if there is an easier way? Is it possible to give the shell command some parameter that will stop this console app closing of its own free will?

Thanks for any help

How To Quit An Application Generated From Shell
First, sorry to repeat this question that I've seen answered lots of times, but I can't make work.
I'm running VB6.0 and am trying to create a "printto" action to make an application print automatically which needs to be set up before it can do so. I can launch the appropriate application, and through sendkeys I can make it dance (and print). Now I want to terminate it (when the print queue is empty-another problem for another day).
I've seen API examples which I've struggled to get my head around, but when I copy them in to see what happens I get syntax errors and the like. As I don't understand what they should look like I can't fix them. Can anyone help?


If you assume I'm really stupid you won't be far wrong!

Call Application (shell) To Run As Different User?
I can successfully call an external application within my VB code. My question is can you call it to be ran as a different user? The application I want to call needs admin rights to properly run. Ant help is much appreciated.

Shell-run Hidden External Application
I have to run an external application as a hidden task and noticed, that several applications won't run hidden. For example, in the following code, notepad.exe starts hidden as a process, and calc.exe starts normal in a window. The '0' is for hidden mode.

Shell("c:windowssystem32calc.exe", 0)
Shell("c:windows
otepad.exe", 0)

The symptom occurs also when I try it with AppWinStyle.MinimizedFocus.
I got this problem also in VBScript, and hopefully tried it in real VB with no success.

Any idea how to run ANY app hidden?

Shell.Application ActiveX Error
I am attempting to use the following lines of code:


Code:

set objShell = CreateObject("Shell.Application")
objWSHShell.Open "C:MSAInvoice.htm"


To open an HTML file when the user clicks a button on an Outlook Form. On one computer (Windows XP, Outlook 97) these lines of code worked great. On Another (Windows 98, Outlook 97) they also worked fine.

Problem is, many of the clients using this form are running Windows 95 and Outlook 97 or 98. When the code runs we get an "ActiveX Cannot Create Component Shell.Application" error message. Internet Explorer 5.5 is installed on the machine, and I have specifically installed Windows Scripting Host 5.1, but am still receiving the error.

Does anyone know what I'm missing? Thanks!

--Ben Finkel

Shell.Application Code From Variable Cells.
I'm having problems with a Workbook I've been creating in Excel.

I need to be able to select a user from a ListBox, click "View Files" and be taken to the user's My Documents on the network. All the usernames are stored in "Data!J3:J50" and the concatenated pathnames to launch are in "Data!M3:M50"


Code:
Private Sub FileURL_Change()

'This is a textbox to show the path I'm trying to get to, to the end user.

End Sub

Private Sub NameList_Click()

'This is the list of names.
' Values set via properties as "Data!J3:J50"

Dim FolderToView As String
FolderToView = "??????" 'This is where I'm not sure of the code.

FileURL.Value = FolderToView

End Sub

Private Sub ViewFilesButton_Click()

Set wShell = CreateObject("Shell.Application")

wShell.Open FileURL.Value

End Sub

I can get the TextBox to display the Value of the ListBox selection but I need it to display the respective information for the pathname of the user.

Basically I need to select "Doe, John" (Cell Data!J3) from the ListBox, it display "\server2usersAA1234" (The concatenated pathname in cell Data!M3) and then when you click the CommandButton the pathname opens in a new window (This much I can do with a static pathname, but not a variable one like I need.)

Any Ideas?

Problem Running Application Using Shell Command
Hi, running application in vb made my project easy by using Shell(appPath,windowstate) command.

now, i got a list of applications in my database with its correct path, the prob is, when i try to run those application one-by-one, they all run except for one application which is the most important applications for my client pc (because it is the most favorite application of my costumers), but the program runs abnormally when i run it using shell command, i checked the application's path, but it is correct, when i try to run that application w/o my prog, it ran normally, even its shortcut on my desktop, normal!

What probablly the problem is??

I think it's not with my code, cuz the other application runs normaly, except with that application. BDY, the application i am talkin' bout is a game application, do you know MU Online? by Mobius? it is an online game like Ragnarok!!! also ragnarok runs normally in my project, except really MU...

But when i compiled my program and create the exe file, i try to paste that exe program to the folder where MU resides, then i run my prog, then click the button, THEN iT RAN NORMALLY!?!?!... i check out the properties of MU's shortcut in my desktop, there I see 2 paths: the "target" path w/c is the whole path of the application including the mu.exe file, the other is the "start in" path, where also display the application path but excluding the mu.exe file.

i think the problem is within the application i am trying to run, not in my program, or maybe there is something wrong with the shell command, maybe parameters or sumthin'....

does anyone encounter this type of problem???

then if so, can you share it to this forum, so that i can find a solution to my problem... and it will gladly appreciated!!!... thanx....

BuB'

Shell() An Application That Opens The File (resolved Again)
i cant believe i couldnt find a clear answer for this on this board...

i need to programatically launch the application that is associated with a file's extension. like i would use

VB Code:
Shell "C:junkmyfile.doc"

to launch Word with myfile.doc loaded. is there an easy way to do this, or do i have to work back the application associated from somewhere in the registry?

Shell Default Application To Open A File
how do you shell a document instead of an application so that it opens with the default application for openiong files of that filetype. Basically what i a trying to do is shell a word document so it loads word or wordperfect. I cant be arsed to mess about with the registry anymore.

Shell An Application And Terminate It According To Specific Time
hi guys... can help me up? now I am facing one problem here...

if I want to shell an application and terminate it according to specific time.. (maybe this movie file is 5.41 min then I want to terminate on that time)

as I know, if I put the active X inside the VB form, then I can use some certain function to check the status and the total time for each movie.. I can do this.. now I want to shell it and run it independence.. can I do that as well?

if I want to shell Flash like extension EXE application, can I check the time for that flash as well? what API I need to include?

I hope someone will help me up.. coz its urgent... now don't know what to do... >.<

good luck to u all.. guys~~!

have a nice day

Shell.application Dir Including Hidden Files And Folders
Ok i have some code similar to the following that basically dir's files and folders ... the only problem is that i cant work out how to include hidden files and folders -- any suggestions on how to solve this would be appriciated


VB Code:
Set m_shl = CreateObject("Shell.application")    Set drives = m_shl.NameSpace(LCase(CurrentPath))    For Each driveItem In drives.Items        ............    Next


thanks in advance
Kris Bennett

How To Run A DOS Application In VB Application Without Display The Window's DOS Shell Window?
Hi,

I want to run a DOS application from my VB application.

My question is how to run a DOS application in VB application without display DOS prompt window.

How To Bring Back Focus On The Main Application When Shell Command Was
hi to all,
i need some help in vb6. i created a main application that calls another application via shell command.  the main application is a plug-in from a mother application.  if the mother application is terminated, the main application as well as the other applications executed via shell must also be terminated. i was able to check if the mother application is terminated in the main application so i can terminate it as well. but the problem lies if the other application is in focus not the main application. i need to go back to the main application before i can tell that the mother application was terminated. is there someone out there who could help me set the focus on the main application if the mother application is terminated even if there are other application executed via shell command? please help and thanks in advance.

Execute Button Click On Window Of An Application Opened By Shell/CreateProcess Method
hi all,
can any one tell me how to click a button/send "enter" key
programmatically to a window opened by an application. The application
was executed from a CreateProcess method. Hence the calling programme
should send the message to the window of the called application.

--
With Regards,
Jay

CreateObject("Shell.Application") Error
After searching a ton, I'm stuck :-(.

I'm trying to unzip things using the built in "Extract File..." shell option in Windows XP.

Here's the code:

Code:

Private Sub UnzipFile(PathToZip As String, PathToDest As String)
Dim MyObj As Object
If Mid$(PathToDest, Len(PathToDest), 1) <> "" Then PathToDest = PathToDest & ""
Set MyObj = CreateObject("Shell.Application")
MyObj.Namespace(PathToDest).CopyHere MyObj.Namespace(PathToZip).items
Set MyObj = Nothing
End Sub


The issue is that I'm getting an error 91: "Object variable or With block variable not set " when I use variables in the line "MyObj.Namespace(PathToDest).CopyHere MyObj.Namespace(PathToZip).items". If I change it to "MyObj.Namespace("C:TEMP").CopyHere MyObj.Namespace("C:MyZipFile.zip).items" it works great.

i've tried changing the variables to byref and byval (just incase) to no avail.

Any suggestions on how I can use variables with this?

Thanks in advance!

Running Batch Files Using Shell/Shell Execute
Hello Everyone,
I am running a .bat file using Shell command.It gives me an error stating that "Please go to control panel to install and configure components".The batch file is located in the C: .However I can run .exe using the same and it
works just fine.
Any help will be much appreciated.
Thanks in advance.
SK

Capture Output From Shell Or Wait Until Shell Is Completed?
Hi,

I'm programming a VB program which generates C code for the gameboy advance and then compiles it. I run two shell commands. Firstly, to compile the code and secondly to the link the objects together to create the gba rom. The problem is that the second shell command runs before the first one is complete. I did manage to sort of get around this by running a while loop until the file generated by the first shell command exists but there are two problems with this. 1) It doesn't always work for some reason and 2) it would be really easy to crash a system using this program which I don't really want to be responsible for. I thought of two solutions but I'm not sure if they're possible. 1) is it possible to capture what is output into a shell window into a string to check if it was completed successfully 2) pause visual basic until the first shell command was completed successfully.

Can anyone help?

Redneon

How Can You Get A List Of Windows Shell/user Shell Folders?
Windows Shell Folders:
AppData, Cookies, Desktop, Favorites, NetHood, Personal, PrintHood, Recent, SendTo, Start Menu, Templates, Programs, Startup, Local Settings, Local AppData, Cache, History, My Pictures, Fonts, My Music, Administrative Tools, CD Burning

Windows User Shell Folders:
AppData, Desktop, Favorites, NetHood, Personal, PrintHood, Programs, Recent, SendTo, Start Menu, Startup Menu, Templates, My Pictures, Local Settings, Local AppData, Cache, Cookies, History


There has to be a simple way of getting these folders.. anyone know how?

Shell Or Shell Execute Problem
I have been trying to figure this out for a couple of hours and have been searching the threads here, and I still cant find an answer so I thought I would ask.

I have 2 msFlexgrids. One stores paths to media players on the users computer, and the other one stores paths to movie files. I know how to launch a movie using the shell execute function, but I want the user to be able to select a player other than the default player. After searching the forums I came up with something like the code below...


Code:
Shell "C:Program FilesWindows Media Playerwmplayer.exe ""F:MoviesClip 01.mpg", vbNormalFocus
That line of code works, but I need to use variables instead of actual paths so I wrote something like this

Code:
dim playerPath as string
dim filePath as string

playerPath = msflexgrid1.object
filePath = msflexgrid2.object

Shell playerPath & " " & filePath, vbNormalFocus
This code would work if the file was named clip01.mpg, but its not. The file is actually named clip 01.mpg so im pretty sure that the space between the p and the 0 is whats causing the problem.

I also tried using shell execute but It always launches the file in the default plaer.

Code:
ShellExecute Me.hwnd, vbNullString, filePath, vbNullString, playerPath, SW_SHOWNORMAL
Can someone please tell me how to write this line of code? It seems like it would be really easy but I can not figure it out. I dont know what Im doing wrong.

Thanks

Quick Shell Question(can I Shell This?)
I want to Shell something but, the file extension doesn't end with ".exe".

It's for a computer game and if I could Shell this file it will then Shell the proper executible on it's own.

Here is my syntax:

VB Code:
Shell (File1.Path & "" & lstMaps.Text & ".unr") 'wich is "C:UnrealTournamentMapsCTF-Coret.unr"  

When I try to Shell that I get runtime error 5. Is there any way to Shell something that's not an executible?

Thanks in advance

Shell=Myapp.exe Vs. Shell=Explorer.exe
In one of my previous posts I wanted to set the System.ini shell to Shell=Mysoftware.exe oppossed to the normal Shell=Explorer.exe. Once my program unloads I wanted to actively shell the traditional windows explorer with the desktop and etc. What happens When ever I do this, is that my app unloads and windows explorer opens up in a window but this is not the traditional, "desktop" Explorer instead it is the Windows Explorer browse screen , the one we would use to browse our pc's.

I was told this was because you can not shell one application and then shell into another without rebooting first. Is this the case?

It is not that I did ot believe this person, it is that I just need to be sure that shelling from on e app and then shelling into another without the PC rebooting is possible. What say you?

Shell My App Then Shell Out To Explorer.exe???
I have designed a security program and I need it to prevent an unauthorized user from gaining access. Once my software is shelled, it will fill the entire screen with a lockup image and disable the mouse, hide the taskbar, prevent ctrl+alt+delete, ctrl+esc, tab+alt, alt+F4 button presses. I also have it hidden from Window's Close Program list, similar to a screen saver coding as recommended here on VBworld.


mastermind94 suggested I try the following:


Quote:




In System.INI, change the shell to your program

[Boot]
Shell=Explorer.exe

Then, when you program is done, run Explorer.EXE...







Once the System.ini is processed my software is successfully shelled and Windows is halted. My delemma is that in my code I am using the following coding to load up the Explorer.exe as mastermind94 suggested:


Code:
Private Sub tmrVisible_Timer()

'Launch the Explorer.exe shell to begin standard the windows gui
'Remember the System.ini has been altered to alow Shell=Avoidance.exe
Dim lRet As Long

'Check whether the ((Shift) + (Numeric pad's +)) keys have been pressed.
'If they have been pressed then close the security app and launch to Standard Window's Desktop.
If (GetAsyncKeyState(&H10)) And (GetAsyncKeyState(&H6B)) Then
lRet = Shell("C:windowsExplorer.exe", 1)
ShowCursor 1 'Call Show function to show the cursor
tmrVisible.Enabled = False
Unload Me
End If
End Sub


Unfortunately what happens is that my software unloads and only the Windows Explorer window is loaded but not the traditional desktop with the icons. I then would have to laod up with a startup disk in order to beable to edit the System.ini shell=Avoidance.exe back to shell=Explorer.exe.

What am I doing wrong and how can I successfully shell my app first and then have my app shell later to the normal Windows Desktop?

Shell 3 - Revenge Of The Shell
Is there anyway to make sure that your program doesn't continue on until it has finished doing what ever you have set for it to do in the shell?

Shell / Shell Excecute
Hi all,
I need a simple but urgent help.
I hav a VB6 application which calls an external exe (usingShell/shell
execute)
I need this external exe to stay top of this VB6 application until it is
closed . ie; i shouldnt be able to
work on VB6 application until this external exe is closed
I tried passing various parameters wit no success.
Can any1 help me in this regard

thanks in advance
Vipin

How To Handle Size && Position Of Console Application With Windows Application In VB6
Hi Dear All,

I am facing a major problem in VB6. I wants to create an application in VB6 which contains one OLE control and one Picture box. OLE control contains the Word Document and in Picture box a DOS based application which is already developed should show. I am using shell function to call the DOS application but unable to set its Size and Position. So please help me to solve this problem. I have already used some of the API's like ShowWindowPos(), MoveWindow(), DeferWindowPos() but thease function works only for Windows based exe not for DOS based exe. Please tell me the way to solve the problem.

OR If somebody tell me how to convert a DOS based exe program into Window based exe program so that I can call DOS Application as a Window based application.

So please help me asap.

Thanks
Deependra Pathak

How Can I Code My Application To Successfully Hide My Application&#039;s Proccess Usage?
How can I code my application to successfully hide my application's proccess usage from NT's Task Manager's Proccess listing and Window 98/ME's Microsoft System Information>Running Tasks listing?

The second feat I would love to code is to successfully hide my application from Window's MSconfig utility.

What say you?

Application Wont Run Because Application Needs Newer Version Of A DLL File
I have created a small little install screen in VB6 that will launch the installation of the program I created.
This small screen is set to run from the CD-ROM when the CD is inserted into the CD-ROM drive(autorun).

I have put all of the necessary VB runtime files on the CD-ROM so the application will run right in the app.path of the EXE of the install screen.

Here is the problem when testing the screen it works fine from some computers and comes up nicely like it is supposed to do. However on some older opperatining systems such as Windows 95B I get an error that says : This file requires a newer version of DLL(usually oleaut32.dll), however the file it requires is right in the app.path on the CD-ROM?

It seems to be searching the C:WindowsSystem directory first before searching the app.path. And when it encounters an older version it displays an error and refuses to show the install screen.

The only thing I could come up with in the short term is to include the new version of VB Runtime files for the user to install first. What I want to know is there any way to force the program to search the app.path first so it wont generate this error? Or is there any other way to get this install screen to run on all computers with older operating systems without installing the new VB runtime files to the users Hard Drive?

Any suggestions anyone can give me would be most appreciated

Application.visible Still Flashing Word Application
Hi All

This is my first post to one of the most impressive looking newsgroup forums I've seen.

I've created a VB .dll that creates and uses merge templates and then converts it to PDF format. However the client requires that the End User is not aware that Word is involved in the process and wants me to hide Word while the merge is happening.

I've tried both Application.visible = false and Application.WindowState = wdWindowStateMinimize, but Word still flashes up - albeit for a short time and the focus is lost from the Client's application.

Please could anyone advise what I've overlooked. (I have had very little VB or Office automation experience to date - but we've all got to start somewhere!)

My function is included below. Any comments about how I can improve my coding techniques would also be welcome.

TIA
GRAPL

Code:
Public Function fMSWORDMerge( _
ByVal pWordTemplate As String, _
ByVal pDataFile As String, _
ByVal pSaveFileAs As String, _
ByVal pPrintOption As String, _
ByRef pErrorMsg As String) As Boolean

Dim oWordApp As Object
Dim oDocument As Object
Dim bOK As Boolean
Dim bSavePropertiesPrompt As Boolean

On Error GoTo ErrHandler

bOK = fOpenWordApp(oWordApp, pErrorMsg)
If Not bOK Then
GoTo ErrHandler
End If

bSavePropertiesPrompt = oWordApp.Options.SavePropertiesPrompt

With oWordApp
.WindowState = wdWindowStateMinimize
.Options.SavePropertiesPrompt = False
.Visible = False
.Documents.Add Template:=pWordTemplate, NewTemplate:=False, DocumentType:=wdNewBlankDocument
With .ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
.ActiveDocument.SaveAs FileName:=pSaveFileAs, AddToRecentFiles:=False
End With

If UCase(pPrintOption) = "PRINT" Then
oWordApp.ActiveDocument.PrintOut
ElseIf UCase(pPrintOption) = "PDF" Then
PrintToPDFActiveX oWordApp.ActiveDocument, pErrorMsg
End If

oWordApp.Documents.Close SaveChanges:=wdDoNotSaveChanges
oWordApp.Options.SavePropertiesPrompt = bSavePropertiesPrompt

oWordApp.NormalTemplate.Saved = True
oWordApp.Application.Quit

Exit Function

ErrHandler:
For Each oDocument In oWordApp.Documents
oDocument.Close SaveChanges:=wdDoNotSaveChanges
Next oDocument
oWordApp.Application.Quit
End Function

How To Make Sure Application Waits For Another Application To Finish
I'm sure this is not the first time this question has been asked.

My VB application needs to execute another application using the Shell command. The other application will manipulate some data and it could be a little time comsuming and it is imperative that my VB does not continue on until the other application has finished processing the data.

How do I do this?

How To Open An Application And Send Value To The Application Variable...?
I use the following coding to call out another application from current application, but I don't know how to send some value to new opened application...?


Code:
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
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long

Private Sub CmdOpen_Click()
On Error GoTo Err1:

Dim MyAppID, ReturnValue
ReturnValue = Shell("C:Program FilesMCSSMCSS.exe", 1)
AppActivate ReturnValue

End Sub

Call A Make My Application Run A Sub Routine, From Another Application?
hey guys,

how can i make my application run a sub routine, from another external application?

Explaination:

Say i have two EXE's

1) MainApp.exe
2) Settings.exe

When / If I change & save any settings in Settings.exe, how can i make MainApp.exe re-call a sub (IE: LoadSettings()) to get the new settings from an ini file?

is it possible?


Thanks guys.
Wayne

How To Embed An Application In The OLE Control? (The Application Is Not EXCEL),thanks
How to embed an application in the OLE control? (The application is not EXCEL or Clipboard),thanks

Running A VB Application From MS Office Application Menu
Is there a way of adding a custom button to the main menu of a MS Office product (eg Outlook, Word etc) which when pressed will activate my VB6 application?

I have read about creating an app as a COM add-in but was hoping there is a simple way.

Thanks

Mike

When you call out for help in the darkness, and you hear a voice in return, you're probably just talking to yourself again!

How To Get Handle Of Active Control Of Any Application From My Application
how can i get the handle of any active control (edit control) of any other programe from my programe. i.e. if nodepad is running, i start my application, and set focus to notepad, my application shows the handle of the edit control of notepad.

Containing Text/data From C/c++ Dos Application In Vb Application...
I'm building a console in VB and need to know if there is a way to execute an application using Shell(), maybe hiding the application, and then put the data into the console window, like DOS, only in VB. Any help on this would be appreciated...

Copyright © 2005-08 www.BigResource.com, All rights reserved