Consulting

Results 1 to 5 of 5

Thread: Burn CD with VBA

  1. #1

    Burn CD with VBA

    Is there a way to automatize "CD BURNING WIZARD"?

    I need to know how to burn cd using VBA
    WITHOUT Nero, roxio, etc, only with Windows

  2. #2
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    This will add the files of a certain directory to the wait-list of files to be burned.
    [VBA]Sub burn_a_cd()
    'Provide the drive letter of your CD burner
    strDriveLetter = Application.InputBox("Driveletter : ", "Driveletter", "D", Type:=2) & ":\"
    'Provide the source directory. We made one on the c drive
    'and everything we put in this directory will be put on a cd
    strSourceDirectory = "C:\TOBURN"
    'Provide a volume name for your CD (16 characters max)
    strCDName = Date
    Const MY_COMPUTER = &H11
    Set WShshell = CreateObject("WScript.Shell")
    Set objShell = CreateObject("Shell.Application")
    strBurnDirectory = WShshell.RegRead( _
    "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
    & "Explorer\Shell Folders\CD Burning")
    Set objFolder = objShell.Namespace(strSourceDirectory)
    objShell.Namespace(strBurnDirectory).CopyHere objFolder.Items
    objShell.Namespace(&H11&).ParseName(strDriveLetter).InvokeVerbEx ( _
    "Write &these files to CD")
    End Sub[/VBA]Charlize

  3. #3
    Thank you, Charlize

    expanding:
    is it possible to automate the actions the wizard?

    Is it advisable to automate them?

    Again, Thank You


    VVVVVVVVVVVVVVVVVVVVVV
    strCDName = Date '''why????
    Last edited by GalileoGali; 12-09-2010 at 04:16 AM.

  4. #4
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    strCDName = Date '''why????
    You can give any name you want. As long as it's shorter then 17 characters (ie. 16 maximum). I'll probably used it for some kind of back-up routine.

    Charlize

  5. #5
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    Why don't you say you crossposted your question ?

    http://www.mrexcel.com/forum/showthr...=1#post2538748

    Charlize

Posting Permissions

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