HELP: VB6 and Word 2003 vs. Word 2002(XP)

HELP: VB6 and Word 2003 vs. Word 2002(XP)

Post by Nick » Fri, 24 Feb 2006 03:36:35


I have a program written in VB 6. One module accesses word templates in
a folder on a client machine. FOr clients running Word 2003 there is no
probelm. Everything works fine. Clients running 2002 or earlier have
the program crash. I have set up an error handler and cannot even get
the error number. It crashes right away. I reference the MS Word 11.0
Object library in my project and package the msword.olb file in the
install. Why do I get the program crashing for Word 2002 and sooner??

Through a long process I have isolated the line where it crashes:

Set wordDoc = wordApp.Documents.Open(App.Path & "\Templates\" &
DocRs.Fields(3).Value)


The code sample in greater detail is below :

Dim wordApp As Word.Application
Dim wordDoc As Word.Document

Set wordApp = New Word.Application
Set wordDoc = wordApp.Documents.Add

Set wordDoc = wordApp.Documents.Open(App.Path & "\Templates\" &
DocRs.Fields(3).Value)

RichTextBox1.TextRTF = wordDoc.Content


Help is much appreciated.

Nick
 
 
 

HELP: VB6 and Word 2003 vs. Word 2002(XP)

Post by Umlja » Fri, 24 Feb 2006 03:50:31

I don't know much about the Word object, but can the Clipboard help?

--
Rick

 
 
 

HELP: VB6 and Word 2003 vs. Word 2002(XP)

Post by Nick » Fri, 24 Feb 2006 04:08:11


Will it allow me to create a word doc from a word template? Sorry but I
am not familiar with the Clipboard.

Nick
 
 
 

HELP: VB6 and Word 2003 vs. Word 2002(XP)

Post by Mike » Fri, 24 Feb 2006 11:33:09


What does the clipboard have to do with anything? Can you let us in on
whatever reason you think the clipboard could help in any way? I just can't
even think of why you would even bring up the clipboard. Apparently, you
have SOME reason for it. I'm curious as to what it is.


--
Mike
Microsoft MVP Visual Basic
 
 
 

HELP: VB6 and Word 2003 vs. Word 2002(XP)

Post by Nick » Wed, 01 Mar 2006 02:50:51


Hello,

I posted this last week, but was out of town and as a result it seems my
issue has been lost in the plethora of other posts.

Does anyone have a suggestion to my issue below? Someone mentioned the
clipboard, but I do not believe this will allow me to create a word doc
on the fly.

Thanks for your help.

Nick