Word application screenupdating not working
The error is DISP_E_BADPARAMCOUNT: ADD The routine works on my laptop but not at the office PC using Vista and Office 2007. Moving a working application over to the new server this week, the API functions fail.Is there something that maybe set at the office PC either Vista or Office 2007 that maybe stopping this routine to work. An updated version of is availble for download here: New server: Windows Server 2008 R2 Office 2010 32 Bit The exact same Access code is still working fine on the Windows Server 2003 using Office 2007.I invite you to send me your (working and tested!!! I also welcome comments and suggestions on improvements! Can you please exapand on a situation for migrating to Windows Server 2008 R2 and the 32 Bit of Office 2010?
TXT and by default is installed to: C:\Office 2010 Developer Resources\ "Private Declare Ptr Safe Function Get Window Longptr Lib "USER32" Alias "Get Window Long A" (By Val h Wnd As Long Ptr, By Val n Index As Long) As Long Ptr" "Private Declare Ptr Safe Function Get Window Longptr Lib "USER32" Alias "Get Window Long A" (By Val h Wnd As Long Ptr, By Val n Index As Long) As Long Ptr" Wrong, sorry. The DLL works perfectlly on another XP SP3 Workstation with Office 2007.
The only things that require Long Ptr are function arguments or return values that represent addresses in memory. Value Cells(f, 3) = (p - 5) / 26 Cells(f, 4) = Hoja2. Variable 'o' goes from 1 to 20 and variable 'p' goes from 1 to 42. Since I'm cutting and pasting this code into VBA7, wrapping each api call with the: #If VBA7 Then .... There is a document from MS which I think covers most API 64-bits declarations and constants: Win32API_Ptr contains the following: 32-bit (x86) and 64-bit (x64) compatible Declare statements for the Windows API functions that were included in the original Win32file.
This is because a 64-bit OS has a memory space that is too large to hold in a Long data type variable. So in 64 bits it takes, at least, AN HOUR while in 32 bits it takes 15 SECONDS!!! I think is a bug of Office 2010 64bits, and i'm thinking about install 32 bits to get that problems off. Global constant declarations for the constants that the provided Declare statements use.
I think the best bet here is to use Win64 instead of VBA7 and use Alias "Get Window Long Ptr A" and Alias "Set Window Long Ptr A". Private Declare Ptr Safe Function Get Window Long Ptr Lib "USER32" Alias "Get Window Long Ptr A" (By Val h Wnd As Long Ptr, By Val n Index As Long) As Long Ptr Private Declare Ptr Safe Function Set Window Long Ptr Lib "USER32" Alias "Set Window Long Ptr A" (By Val h Wnd As Long Ptr, By Val n Index As Long) As Long Ptr Note that this Declare should be conditialized on Win64 instead of VB7, because Get/Set Window Long Ptr do not exist as an export on 32-bit Windows. The same code runned at 32 bits works fine and very fast (the report takes only about 15 seconds). Address Then Call Calendario End Sub --------------- Private Sub Calendario() Active Sheet. On a Windows 7 (64 bit) with Office 2010, the error message that the DLL must be updated with Prt Safe is required (as we all expected. And, suggested that there are some DLL for Windows 7 that may have to be upgraded.
The Declare for Set Window Long Ptr above is wrong. Here is the code: ---------------- Private Sub Worksheet_Change(By Val Target As Excel. Unprotect ("BCG") f = Cells(1, 1) 'f=fila de comienzo ff = Cells(1, 2) 'ff=fila final m = Range("L5"). Back at the customer site, the same copy was run on a new Windows 7 Enterprise (32 bit) with Office 2010. Setting the MS Access 2010 exe running as administrator in Compatibility Mode for XP sp 3 - it still fails. Rx Tesla 3D, Denver I run Windows Server 2008 R2 64 bit and Ofice 2010 32 bit.