BP issue: MS Word Opens in a Different Place Every Time

maubrey

New Member
I have a CRM, spied in its own object, that opens a MS Word template. I use the Word VBO to complete and close this template. However, on close a confirmation screen is displayed. This is not part of the CRM, so I cannot spy it. It appears to be within Word itself, but I cannot spy Word itself. To get around this, I open an instance of Notepad and use global send events to cycle through the windows (ALT+TAB), use a check exists to confirm I'm on Word, using a region showing the Word logo, and then complete the details on the confirmation screen to finish the close. This was working fine until the CRM started to open Word in a different size, in a different place. Our IT department do not believe there is anything they can do to fix the size and location of the Word template called from the CRM, so I need to find a solution to this issue myself. I initially thought I could 'snap' each window to the left as I cycle through them, and tried to use the 'LWIN' global send key event listed in the BP Advance Surface Automation Guide but I get an error saying this is an unsupported key (so I assume I'm missing something here). I don't really want to increase the padding area for the region, but I'm running out of ideas. Can anyone suggest an alternative?
 

maubrey

New Member
I've got the global send keys working (not sure what I was doing wrong before) so I have a solution. Would still be interested to hear of others, if anyone has any ideas.
 

VJR

Well-Known Member
Hi maubrey,

Can you tell...
- on close a confirmation screen is displayed
What is the close confirmation box on Word that you are seeing?
Is it the routine "Do you want to Save.... Yes, No, Cancel"?

- It appears to be within Word itself, but I cannot spy Word itself.
For what reason you are unable to spy Word?

- showing the Word logo, and then complete the details on the confirmation screen to finish the close
Are you able to share a screenshot to better visualize what you are exactly referring to?
 

maubrey

New Member
Hi VJR. Thanks for coming back to me and apologies for my delayed reply.

1. The confirmation screen displayed (image attached) has a comments box, three check boxes (Spell Check, Save Changes & Save as Pending) and 'Ok' and 'Cancel' buttons.

2. I can't spy Word as BP detaches from it in less than a second whenever I attach - this does seem strange to me but I haven't been able to find anyone within my own small network of BP developers who has experience of using BP and word.

3. The first attachment I've uploaded shows the confirmation screen. I was using the Word logo on the top-left-corner, but am now using the page number box (second attachment).

As per my previous comment, I have got it working but it's a bit flakey. And, when it does fall over, I am having to kill the .exe which means on restart Word is displaying the document recovery tab which is in itself causing me problems.

I'd be very grateful for any advice you can give!

Many thanks,

M
 

Attachments

  • ReturnToLamda.jpg
    18.6 KB · Views: 14
  • CheckExists.jpg
    2.6 KB · Views: 13

VJR

Well-Known Member
Hi maubrey,

Hope you have tried to spy the popup using the regular ways of using "winword" in the Process Name (if it is opening from Word) and "Return to Lambda" in the Window Title during the Attach in the Navigate stage. If you were trying to attach to this popup using the same Object and is not working, you would now need to spy it using a new Object. Also need to take care of shuffling between Attaching/Detaching the new Object/original Object depending on what is needed at that moment.
To me it doesn't look like it is not possible to interact with the popup. There are a few popup related posts in the forum which you can take a look at to see what has been working for others and what is not if the above instructions do not work for some reason.
 
Top