Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21901

temp file location changed from XP to Vista/7

$
0
0
My program generates an html page to launch in the user's browser to make a printout of contacts. It worked fine in XP.

Code:

    Open App.Path & "\print.htm" For Output As #1

        Print #1, strHTML(0);
        Print #1, strHTML(1)

    Close #1

    Call ShellExecute(0&, vbNullString, App.Path & "\print.htm", vbNullString, "C:\", 1)

Like I said, the code works just fine bringing up a print page in the user's browser in XP, but check out the difference in where XP created the file and the new location for this file under Vista & 7:

Attachment 93323

The first line in the above image is working fine through app.path in XP, how do I code it so my print.htm file from this \VirtualStore\ folder will load just the same on Vista & 7?
Attached Images
 

Viewing all articles
Browse latest Browse all 21901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>