Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do I MkDir with properties attributes= hidden? (VBA - word97)

    HIya
    I'm making a directory & I want the directory to be hidden.
    On my new directory folder how I do apply the hidden attribute using code.
    I cant seem to find anything.
    TIA regards Diana

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how do I MkDir with properties attributes= hidden? (VBA - word97)

    Maybe this is a silly question, but why are you trying to hide a directory?
    Charlotte

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how do I MkDir with properties attributes= hidden? (VBA - word97)

    <pre> SetAttr "C:Test", vbHidden
    </pre>

    Legare Coleman

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how do I MkDir with properties attributes= hidden? (VBA - word97)

    HI Charlotte - the reason I'm wanting to hide a directory is the following:

    my code from a word document generates a pdf file.
    however due to client specifications
    the document has to be formatted 1st & then converted to pdf.
    By formatting I mean include company logos
    or watermarks in the document.

    I save the word doc then convert to pdf
    in C:temp directory.
    Both files word & pdf are stored in c:temp.
    My code then performed housekeeping & deleted the word file
    so user would only view the pdf file.
    When users send emails - all files get saved into C:temp directory - from notes the users then attach files from c:temp.

    However the issue was - deleting the word file due to file access
    eg if extremely large word doc ie 80 pages or a slow pc

    I thought I could resolve by writing timer code - ie every 10 or 20 secs check if word file free - if free then delete the word file.
    However I wasnt having any success with the timer code.
    (I've made other SOS posts to the forum regarding this issue)

    My solution is in C:temp diretory create another temp folder
    eg C:TempConvert
    Make the Convert directory hidden - save the word file in this directory
    & the pdf file in C:temp.

    This resolves
    as the standard operating environment - users have the windows view set to hide file types therefore wont see this '2nd temp' directory.
    - theres no danger of users drilling down to C:tempconvert & accidentally emailing the word file as
    users cannot see this directory.
    & most users being IT illerate wont know how to enable this feature.
    also the login script cleans out the C:temp directory each time user logs on/off.
    resolved - WHOA!!!!!!!!!!!!!!!!!!!!!!!!!
    regards Diana

Posting Permissions

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