MartyConnelly
martyconnelly at shaw.ca
Tue Aug 2 16:20:48 CDT 2005
You are using late binding so you don't need any references set to Word, which maybe causing the problem It might be useful to have a reference if using intellisense or looking at object browser but you would remove the reference before deploying with late binding. With late binding it will grab the highest version of word on the system You might be using some esoteric part of word say using xml file routines that don't exist in Word 97, so you may want to check the version of word running to avoid problems with lower versions. On Error Resume Next ' grab word if already running Set objWord = GetObject(, "Word.Application") On Error GoTo 0 ' or if word not already running error Err.Number = 429 or set to nothing If objWord Is Nothing Then Set objWord = CreateObject("Word.Application") Debug.Print objWord.Version ' if Word 97 SP2 then Word Version= 8.0b ' Word 9 opens a separate window for each document. ' Prior to Word 9, all documents opened in the same window. End If Kim Wiggins wrote: >I am using >Set objWord = CreateObject("Word.Application") > >Do you think that could be the problem? >Kim > > >MartyConnelly <martyconnelly at shaw.ca> wrote: >Are you using early or late binding. >Set objWord = CreateObject("Word.Application") >or >Set objWord = New Word.Application >Funny things may happen with early binding if newer versions of word >installed and then uninstalled. > >Kim Wiggins wrote: > > > >>Hey everyone >>Hope all is well. I am not. I coded an automation report in VB6 using Word and it works fine on my work laptop and my laptop at home. But when I install it on the users computer, it gives me the standard application error and shuts down. It says "My_app_name has encountered an error and must close" and then it offers to send a report. Well that is flooring me because it runs in the development environment on both machines just fine. >>Can anyone think of anything that I am missing or overlooking? >>Thanks >>Kim >> >> >>--------------------------------- >>Start your day with Yahoo! - make it your home page >> >> >> >> > > > -- Marty Connelly Victoria, B.C. Canada