| View previous topic :: View next topic |
| Author |
Message |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Wed Apr 23, 2003 1:11 pm Post subject: @shift problem |
|
|
A while ago (working with Office 97 on Windows NT 4.0) I wrote a little program that created a lettre in Word based on items in a list.
Recently I upgraded to office XP on Windows 2000 and if I use my program now, I've noticed that the @shift-function doesn't work anymore.
(I used it to highlight a block of text, delete and replace it with an item out of the list).
It works fine when I use it on Windows 2000 - Office2000 so I guess it's an OfficeXP-issue.
Has anybody encountered simular problems and if so is there a workaround?  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Apr 23, 2003 8:14 pm Post subject: |
|
|
Could you by any chance post some example code you are having
problems with?  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Thu Apr 24, 2003 6:39 am Post subject: |
|
|
Hi there!
You're right! A bit of sample code always helps so here goes:
| Quote: | window send,%W,@SHIFT(@KEY(END))
window send,%W,@KEY(DEL) |
Where %W is the active window (Word document).
Actually this is part of an errorcheck. As I said before the word-document is created based on a list which is actually a textfile (.tab) generated by Filemaker Pro. In Vds I simple rename the file to a .dat-file and read it line by line and send the data to the active window.
This list can be in 4 different languages (English, French, Dutch and German) which means that sometimes special characters are included (like the german ü-character etc.). If one of these characters is included in a word Vds skips it.
So what I do is perform a @OK() check after every window send action.
When the result of the check is Not @OK() the program jumps to a subroutine that cuts every word into separate characters and checks it's ascii-code.
Finally VDS reselects the fawlty data using: | Quote: | | window send,%W,@SHIFT(@KEY(END)) | and deletes it. It then sends the changed data to the window.
As I said before: this has always worked perfectly until I started using Office XP.  |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Apr 24, 2003 6:43 pm Post subject: |
|
|
Check to make sure the class name/window title/window handle you are
using is correct.
Second, I would recommend use DDE to control Word for this. While I
don't have an example I'll dig around and see what I can find.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Fri Apr 25, 2003 6:32 am Post subject: |
|
|
Hi!
The class name/window title and handle are correct since all the other commands work just fine.
DDE commands however sound great! I've been thinking about those myself but unfortunately it's almost impossible to find info on.
Thanks in advance! |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Apr 25, 2003 6:40 pm Post subject: |
|
|
I think there was an example posted here or in the archives. I'll check in
a minute.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Jimjams Newbie

Joined: 23 Sep 2002 Posts: 21
|
Posted: Mon Apr 28, 2003 2:47 pm Post subject: |
|
|
Thanks Guys!
I've got it! This does exactly what I want; | Quote: | DDE LINK,winword,system
DDE EXECUTE,+{END}{DELETE}
DDE TERMINATE |
Thanks for putting me on the right track!  |
|
| Back to top |
|
 |
|