Results 1 to 2 of 2

Thread: Ligne de commande

  1. #1

    Ligne de commande

    Bonjour à tous,

    Utilisateur depuis longtemps je souhaite automatiser sous vba. Après analyse des différentes commandes voici l'extrait de ma procédure.

    xlDossier = " U:\02016 - Dossier 2016\10485AVT - Rue de Berchon - 7340 Colfontaine\Berchon21"

    stAppName = "C:\Program Files (x86)\ObviousIdea\Light Image Resizer 5\Resize.exe " '
    stAppProfile = " /profile=original25% /run"

    stAppName = stAppName + xlDossier + stAppProfile
    Call Shell(stAppName, 1)

    Resize s'ouvre correctement mais je ne retrouve pas les photos existante dans le dossier.

    Quelqu'un peut-il m'éclairer.

    Grand merci

  2. #2
    Administrator Phil's Avatar
    Join Date
    Mar 2011
    Posts
    241
    Hello,

    your path contains spaces, so you need to wrap it in quotation marks. I think in VBA you have to double them to use in a string.

    It should work like this:

    Code:
    xlDossier = " ""U:\02016 - Dossier 2016\10485AVT - Rue de Berchon - 7340 Colfontaine\Berchon21"" "

    Same also for the profile, if it contains spaces it won't work. Better use quotes:

    Code:
    stAppProfile = " /profile=""original25%"" /run"

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •