View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Problem with Excel 2003 and VBA to Open Doc

How about just using the Environ Variable:

? environ("Temp")
C:\DOCUME~1\OgilvyTW\LOCALS~1\Temp


--
Regards,
Tom Ogilvy


"bema" wrote in message
...
We are trying to call System-DLL Functions zu get Temp-Folder-Path and
REgistry Settings.

We try to read RegOpenKeyA and RegQueryValue EXA and RegCloseKey out of
ADVAPI32.dll and try to read GetTempPathA aus Kernell32.dll.

This is working fine on some Pcs. But we have also trouble on others ! ??
The Registry Call delivers no failure and no value. GetTempPathA close

with
failure Value 0

On the PCs with problems where is also another apllication using the
GetTempPathA Call with no problems.

How can we solve this ??


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow

this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.


http://www.microsoft.com/communities...el.programming