473,386 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Activate Word document after closing vb2005 dialogbox

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
0 1623

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

Similar topics

1
by: Nicole | last post by:
Like many before me, I am tearing my hair out trying to get Acrobat 6.0 to work with VBA. I am getting close, and the error I am getting now seems like it should be easy to surmount. So why am I...
6
by: Ryan Muller | last post by:
My company just upgraded from Access 97 to Access 2003 today and we are having some issues in a database that generates a Word document from information selected in a form. Here is the code we...
3
by: John Smith | last post by:
Hey folks, I've got a Windows C# application that generates a .doc file and then allows the user to preview it. I generate the file using the StreamWriter class and do a flush() and a close()...
5
by: juststarter | last post by:
hi there here is my problem : there is a main form (frmMain) which calls a searchForm (frmSearch). Then i select an item (from the returned ones) and open a third form (frmData). Taking from...
12
by: Steve | last post by:
I've been building an application that will merge fields in a text file with a word template, save the resulting word file out to the user's hard drive, and then email the file as an attachment. ...
2
by: ClearCut | last post by:
I have written a program in VB6 that opens an existing Word document and adds some text to the top of the document before printing it. Now I want to close the document without saving the changes. ...
2
by: Derek Hart | last post by:
I am using late bound Microsoft Word integration with a vb.net winforms application. If I run code such as the following: Dim objWord As Object Dim objWrdDoc As Object Dim count As Integer...
2
by: vipinkmathews | last post by:
I wrote code for previewing a word dcoument in C#. In the code when the user click preview button the document gets opened and later the user manually closes the document. But in Task manager the...
0
by: Beta | last post by:
Does anyone know how to close an embedded word document in C# application without closing an external Word document? The issue is the external Word Document share the same instance (winword.exe)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.