Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Excel 2003 and VBA to Open Doc
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Excel 2003 and VBA to Open Doc
Thank you for your answer.
But this is not the solution for our problem. I know that I can take "environ" instead of the kernel32.dll-function "GetTempPathA" to obtain the TEMP-Path (or in Word but not in Excel "system.PrivateProfileString" for registry-settings). The strange behavior appears only on some workstations. On these computers I am not able to call DLL-functions out of Word/Excel-VBA. Simple call's like "GetTempPathA" (kernel32.dll) or "RegOpenKeyA", "RegQueryValueExA" or "RegCloseKey" (ADVAPI32.DLL) fails. For example: "GetTempPathA" returns 0 as result-values which means "error", but what error? "RegQueryValueExA" returns no error but an empty string instead the real value Are there any security-settings to prohibit external calls? In other programming languages (like C++ or Delphi) we have no problem to call these DLL-functions on the affected computers. Please don't forget: For me it is important to call standard-DLL-functions! These Word/Excel-macros works for 3 years without any problems; since Office 2003/XP SP2 there is this strange behavior on some (3 of about 25) workstations. "Tom Ogilvy" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 attachments open and show only empty cells when openedvia Outlook 2003? | Excel Discussion (Misc queries) | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
email from excel 2003 is not sent unless outlook 2003 is open | Excel Discussion (Misc queries) | |||
still having problem with open currently open excel file | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming |