Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2018, 01:57 AM
texMan texMan is offline Start .net Exe from Word VBA macro Windows 10 Start .net Exe from Word VBA macro Office 2016
Novice
Start .net Exe from Word VBA macro
 
Join Date: Nov 2017
Posts: 12
texMan is on a distinguished road
Default Start .net Exe from Word VBA macro

Hi,



whenever I start my App (Windows Form app) from a Word VBA macro, it crashes without a message. But it works, when I use the same command from the command prompt.

Example Code:
**************************
Sub Test
Dim cfile As string

Set wshshell = CreateObject ("WScript.Shell")

cFile = """C:\ Program Files (x86)\ myProgram CP\start.exe"""

wshshell.Run cfile, 1, true
Set wshshell = Nothing

End Sub
**************************

Does anyone have a hint?

Greetings, Jürgen
Reply With Quote
  #2  
Old 05-08-2018, 04:55 AM
Guessed's Avatar
Guessed Guessed is online now Start .net Exe from Word VBA macro Windows 10 Start .net Exe from Word VBA macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,988
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Is there really spaces in front of the folder names?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 05-08-2018, 05:10 AM
texMan texMan is offline Start .net Exe from Word VBA macro Windows 10 Start .net Exe from Word VBA macro Office 2016
Novice
Start .net Exe from Word VBA macro
 
Join Date: Nov 2017
Posts: 12
texMan is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
Is there really spaces in front of the folder names?
Sorry this was my mistake. There is are no spaces at the beginning.

This is correct:
cFile = """C:\Program Files (x86)\myProgram CP\start.exe"""

The application starts with a splash screen and then it is killed without any message.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Start .net Exe from Word VBA macro start a macro with command Line startup switches Fesazu Word 3 02-08-2018 12:15 AM
Start .net Exe from Word VBA macro Start macro when placeholder gets focus PellePetimeter Word VBA 5 03-16-2017 04:26 AM
difference between scheduled start and start ketanco Project 3 01-15-2015 07:53 AM
Should be a simple macro, need a start Jamtart PowerPoint 7 08-13-2012 06:11 AM
automatic start of macro + help on writing helper function vsempoux Word 3 10-09-2009 03:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft