Ah, but this is all that's needed to cause the crash when closing Writer. I commented out everything afterward.
Main Topics
Browse All TopicsI'm trying to create a word document from vb.net, and I got the code working and creates the document, but when I close Writer I get the runtime error R6025 pure virtual function call. I've narrowed it down to the last line in the code below. If I exclude that line there is no problem, but I need that line to fill out my document. Any way to fix this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Try this code for me -- just by itself and let me know what happens. Change the file location in the StoreASURL to a location you want to store the file. By the way there is an issue that will stop this from saving to the C:\ directory on a Vista machine so make sure to use a sub folder if saving to C:\
Are you just trying to open a blank Writer document in your code and leave the window open for the user? That is what it looks like to me. If so, then there is no need to use the createtextcursor object as that is used to active an object used to place text in the document via code. Just try the code below.
If you need to place text in the document, let me know and I will have to research the errors a little more. (What version of OOo are you using?)
-Bear
Sorry I did not think of it sooner. As I understand it from the documents and experience, the .createtextcursor creates kind of a hidden cursor - It does activity on the document but never moves the visible cursor position. Whereas the .getviewcursor gets the current visible cursor position and manipulates it. Therefore the visible cursor ends up wherever you leave it. I am guessing that the .createtextcursor was creating some sort of permissions or rights issues between vb.net and OOo that the two could not figure out. Glad it is working now.
Business Accounts
Answer for Membership
by: ltlbearand3Posted on 2009-07-24 at 19:59:32ID: 24940531
If I put your code above in a new vb.net console application, it runs fine. However, depending on what I put in following that code, I can get the error you mention. Can you post your entire code and maybe we can take a look at what can be done.
-Bear