Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I detect an inconsistency between projects(attached), I generate an error message which details the error and reports the template filenames[pre] strMsg = "At least one of the module names is different:" & vbCrLf
    strMsg = strMsg & strAr1(lng) & " " & vbp1.FileName & vbCrLf
    strMsg = strMsg & strAr2(lng) & " " & vbp2.FileName[/pre]
    Sadly at this stage of the game, the filenames reported are the tilde-devices used by Microsoft Word:[pre]20090608111051 Proje ChrisL1 At least one of the module names is different:
    clsInter D:\___Spare\~WRC2473.tmp
    clsInter D:\___Spare\~WRC2473.tmp[/pre]
    I have control of, and could retain the proper external name of the template file before opening it, and get away with that, but I'm curious: Is there any known property/method/technique for obtaining the original name of a template (workbook etc) prior to it's being opened and 'locked' for the operating system?
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I'm sorry, I don't understand. What do you mean by "the original name of a template (workbook etc) prior to it's being opened"?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='778792' date='08-Jun-2009 11:25']What do you mean by "the original name of a template (workbook etc) ...[/quote]
    Thanks for the foloow-up, Hans.
    The application opens a file known as "G:\Greaves\Products\DEVEL\Train\Train026.dot" .
    The application obtains the vbProject of that file as vbp1.
    When the application tries to report the name of the file containing the project, vbp1.FileName, it reports "D:\___Spare\~WRC2473.tmp" as the value of vbp1.FileName.

    The tilde-name is the name we see in places such as the startup folder, and is generally displayed in Windows Explorer as a 1KB file, which (file) disappears once the template is closed.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Hmmm, I can't reproduce that - I get the filename of the "real" document, not that of a temporary file. But since you know the filename anyway, it seems overkill to try to get it from the VB project...

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='778844' date='08-Jun-2009 17:01']I get the filename of the "real" document, ... it seems overkill to try to get it from the VB project...[/quote]
    Thanks Hans.
    Obviously I'm out by a factor of ten somewhere (grin).
    And yes, I already have the filename, which was my means of obtaining the vbProject in the first place.

Posting Permissions

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