By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,929 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

Activate Word document after closing vb2005 dialogbox

P: 2
Hi,

I am loading word with vb2005 customized commandbars. During the load of the Word exe, the exe automatically opens a new document. I am having
difficulty "activating" the open document within the word application after I
close the dialogbox (that is loaded upon the user clicking one of the
commandbar buttons). After I close my dialog box, I see the ibeam cursor in
my word document, however it is not flashing, just a solid vertical line. I
have tried .Activate for the application and active document. If I put a
breakpoint at the .Activate line of code, F5 to the breakpoint, then F5 to
the end of the code, focus is set back to the document and I do have a
blinking cursor. However, if I just F5 all the code (without the
breakpoint), I do not have a blinking cursor. I have tried typing text into
the document after activating the document -->
Application.Selection.TypeText("test") and
Application.Selection.TypeBackspace(). I have tried -->
Application.ActiveWindow.ActivePane.View.SeekView =
Word.WdSeekView.wdSeekMainDocument -->
and still no luck. I am using form.ShowDialog() to display the dialog box
and have tried using form.Close() and also just setting the form = nothing
(without form.Close()). I thank you in advance for any information you can
offer!
Oct 5 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.