Kim Wiggins
kimjwiggins at yahoo.com
Tue Aug 2 17:57:14 CDT 2005
Thanks so much Marty and Marcel for helping me to understand this better. This is my first attempt at automation. Unfortunately, I will not see this user until Saturday so I can't test it out until then but I will let you know next week if everything went well. Thanks MartyConnelly <martyconnelly at shaw.ca> wrote: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 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com