I am trying to automate the display and subsequent closing of multiple bitmaps. I can accomplish by automating word as follows:
After the msgbox & inputbox, the bitmap goes away (word closes). The problems with this are its slow & ugly, and not everyone will have word. I can use the following to open the bmp:
but objShell.quit or .close or .exit don't close the viewer.
I also tried:
but can't get it closed afterward either. How can I grab the goofy viewer app and make it close within the script where I would like it to?
Thanks in advance,
Jerz
Code:
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objShape = objDoc.Shapes
objShape.AddPicture("C:\Scripts\" & (arrRoom(xval,yval)) & ".bmp")
objDoc.Saved = TRUE
msgbox "Blah Blah Blah", 4160, "Message Text"
Answer = InputBox("Question?","Question?",,0,0)
objWord.Quit
More code here, then loop back to top.....
After the msgbox & inputbox, the bitmap goes away (word closes). The problems with this are its slow & ugly, and not everyone will have word. I can use the following to open the bmp:
Code:
Set objShell = CreateObject("WScript.Shell")
image = (arrRoom(xval,yval)) & ".bmp"
objShell.Run image
I also tried:
Code:
ViewProgram = "rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen "
Set objWshScriptExec = objShell.Exec(ViewProgram & "C:\scripts\" & (arrRoom(xval,yval)) & ".bmp")
Thanks in advance,
Jerz