Results 1 to 4 of 4

Thread: Conver VBA to VBscript - Environ("Temp") problem

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2012
    Posts
    10

    Conver VBA to VBscript - Environ("Temp") problem

    I'm trying to covert some VBA code into VBscript. I borrowed the below code from a working VBA macro. This is not the entire code, but just the part that is giving me issues.

    Error Message:
    • Type mismatch 'Environ'


    Thanks for any help!

    Code:
    strtempfile = Environ("TEMP") & Format(Now(), "yyyymmddhhnnss") & ".htm" 
    Set objrange = objdoc.Range(Start:= 0, End:= 0) 
    CreateTextFile strtempfile, strBody   
    objrange.InsertFile strtempfile, , , False, False
    Kill strtempfile
    Last edited by gjohn282; Aug 21st, 2013 at 07:58 PM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width