VBA CODE to switch focus from Access form to Word Document
1 TopicActivating or shifting focus from Access to Word
Activating or shifting focus from Access to Word Dear Sir I have an Access DB in which I have stored Addresses of clients, I have concatenated all address fields in a Memo field. I have placed a button on the form which when I click copies the address from Memo field onto clipboard, this is working fine. I have another button which when I click shifts the focus to an already opened word document. The problem/s is/are sometimes this works fine i.e when I click button focus from Access shifts to Word, but sometimes it doesn't work at all. The other scenario when it doesn't work is when word document is minimised. I can see toggle happening in taskbar but focus doesn't shifts. I am using following code attached with click event of button: Application.activate "Microsoft Word" And when word document is not open it gives error. Any help would be much appreciated. Thank you.Solved1.5KViews0likes5Comments