Microsoft access vba-shift focus from access to word -
i creating , opening word document through access 2007 vba. document created focus not shifted word. instead focus still remains on access form through creating doc. below code:
dim obj word.application dim wor word.document dim str string str = "c:\hello\folder1\vin.dot" set obj = createobject("word.application") set wor = obj.documents.add wor .saveas str .close end obj.visible = true obj.documents.open str obj.windowstate = wdwindowstatemaximize
any sugesstions please.
you can move focus appactivate;
appactivate "microsoft word"
Comments
Post a Comment