until now i never used DDE to retrieve information from word. please, explain where can i find all the topics and commands can be used to communicate with word 2000 through DDE. i couldn't find any reference of it in msdn.
thanks.
i need a real time monitor of Word document contents. i already did it using timer which reads the contents via ole but with big document the massive data transfer 10 or 20 times per second consumes quite much resources. i want to try dde because i was told that dde can notify me when the data is being changed so i won't have to read it so frequently.
You're right - DDE may be the right approach. Since I know nothing about DDE, I might try a different approach: in Word, use event handlers that detect the kinds of changes you are looking for. When they occur, use Word VBA to change a cell on the Excel worksheet you are using to handle the Word changes, and in Excel have an event handler (Worksheet_Change) that detects the change and acts accordingly.
Dim xl As Excel.Application
Set xl = GetObject(, "excel.application"
xl.workbooks("WordHandler".sheets(1).range("A1"=1
set xl=nothing
will do the work inside Word. For this to work, Excel must be loaded and the "WordHandler" workbook must be open.
It works - how efficient this is relative to DDE I don't know. Rob
thanks, rob. hooking via excel is pretty interesting technique, unfortunately i can't use because my application will is used not only by myself. i can't force all the users to install excel, i'll just wait until somebody will through me a "DDE bone".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.