I am trying to port a VBA feature as a VBScript on a Web Page. I keep getting
an "ActiveX object can't create object: 'Word.Application'. Is this a
reference problem? How do you point the page to the where the Word reference
is?

Re: VBA Reference Problem? by Perry

Perry
Tue Apr 17 13:49:52 CDT 2007

Code snippets will do wonders.
Pls show the code.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE



"George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
news:1BE30C66-5722-4A39-80B1-574C09B371CE@microsoft.com...
>I am trying to port a VBA feature as a VBScript on a Web Page. I keep
>getting
> an "ActiveX object can't create object: 'Word.Application'. Is this a
> reference problem? How do you point the page to the where the Word
> reference
> is?


Re: VBA Reference Problem? by GeorgeLee

GeorgeLee
Tue Apr 17 15:26:05 CDT 2007

The intent is for this .htm file to sit on a share and for users to be able
to open documents on their machine. But how do you set the Word reference to
their computer?

...
dim wordApplication
set wordApplication = CreateObject("Word.Application")
wordApplication.Visible = True

dim gSourceWordDocument
'File1.value is the full path name to a .doc file
set gSourceWordDocument = wordApplication.Documents.Open(File1.value)
...

"Perry" wrote:

> Code snippets will do wonders.
> Pls show the code.
>
> --
> Krgrds,
> Perry
>
> System:
> Vista/Office Ultimate
> VS2005/VSTO2005 SE
>
>
>
> "George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
> news:1BE30C66-5722-4A39-80B1-574C09B371CE@microsoft.com...
> >I am trying to port a VBA feature as a VBScript on a Web Page. I keep
> >getting
> > an "ActiveX object can't create object: 'Word.Application'. Is this a
> > reference problem? How do you point the page to the where the Word
> > reference
> > is?
>

Re: VBA Reference Problem? by Perry

Perry
Tue Apr 17 16:39:57 CDT 2007

Do you want to open an .HTM file in IE using VBScript?

Why not navigate to the .HTM file then:

dim oExplorer
open_HTM
sub open_HTM()
Set oExplorer = Createobject("InternetExplorer.Application")
with oexplorer
.navigate "c:\AnyPath\test.htm"
...etc


--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE



"George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
news:BD6011F7-B0A0-45C2-8DEC-EDBB825223EB@microsoft.com...
> The intent is for this .htm file to sit on a share and for users to be
> able
> to open documents on their machine. But how do you set the Word reference
> to
> their computer?
>
> ...
> dim wordApplication
> set wordApplication = CreateObject("Word.Application")
> wordApplication.Visible = True
>
> dim gSourceWordDocument
> 'File1.value is the full path name to a .doc file
> set gSourceWordDocument = wordApplication.Documents.Open(File1.value)
> ...
>
> "Perry" wrote:
>
>> Code snippets will do wonders.
>> Pls show the code.
>>
>> --
>> Krgrds,
>> Perry
>>
>> System:
>> Vista/Office Ultimate
>> VS2005/VSTO2005 SE
>>
>>
>>
>> "George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
>> news:1BE30C66-5722-4A39-80B1-574C09B371CE@microsoft.com...
>> >I am trying to port a VBA feature as a VBScript on a Web Page. I keep
>> >getting
>> > an "ActiveX object can't create object: 'Word.Application'. Is this a
>> > reference problem? How do you point the page to the where the Word
>> > reference
>> > is?
>>


Re: VBA Reference Problem? by Perry

Perry
Tue Apr 17 16:44:40 CDT 2007

If you want to open in MS Word, the problem isn't yr code.
This should work.

If you save the VBScript as a VBS file and run it, does it come up with MS
Word and the document?

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE



"George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
news:BD6011F7-B0A0-45C2-8DEC-EDBB825223EB@microsoft.com...
> The intent is for this .htm file to sit on a share and for users to be
> able
> to open documents on their machine. But how do you set the Word reference
> to
> their computer?
>
> ...
> dim wordApplication
> set wordApplication = CreateObject("Word.Application")
> wordApplication.Visible = True
>
> dim gSourceWordDocument
> 'File1.value is the full path name to a .doc file
> set gSourceWordDocument = wordApplication.Documents.Open(File1.value)
> ...
>
> "Perry" wrote:
>
>> Code snippets will do wonders.
>> Pls show the code.
>>
>> --
>> Krgrds,
>> Perry
>>
>> System:
>> Vista/Office Ultimate
>> VS2005/VSTO2005 SE
>>
>>
>>
>> "George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
>> news:1BE30C66-5722-4A39-80B1-574C09B371CE@microsoft.com...
>> >I am trying to port a VBA feature as a VBScript on a Web Page. I keep
>> >getting
>> > an "ActiveX object can't create object: 'Word.Application'. Is this a
>> > reference problem? How do you point the page to the where the Word
>> > reference
>> > is?
>>


Re: VBA Reference Problem? by GeorgeLee

GeorgeLee
Fri Apr 20 13:12:02 CDT 2007

I stil get the same error message. But then again, the network share it's on
is not the same machine where the file is being opened at.

"Perry" wrote:

> If you want to open in MS Word, the problem isn't yr code.
> This should work.
>
> If you save the VBScript as a VBS file and run it, does it come up with MS
> Word and the document?
>
> --
> Krgrds,
> Perry
>
> System:
> Vista/Office Ultimate
> VS2005/VSTO2005 SE
>
>
>
> "George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
> news:BD6011F7-B0A0-45C2-8DEC-EDBB825223EB@microsoft.com...
> > The intent is for this .htm file to sit on a share and for users to be
> > able
> > to open documents on their machine. But how do you set the Word reference
> > to
> > their computer?
> >
> > ...
> > dim wordApplication
> > set wordApplication = CreateObject("Word.Application")
> > wordApplication.Visible = True
> >
> > dim gSourceWordDocument
> > 'File1.value is the full path name to a .doc file
> > set gSourceWordDocument = wordApplication.Documents.Open(File1.value)
> > ...
> >
> > "Perry" wrote:
> >
> >> Code snippets will do wonders.
> >> Pls show the code.
> >>
> >> --
> >> Krgrds,
> >> Perry
> >>
> >> System:
> >> Vista/Office Ultimate
> >> VS2005/VSTO2005 SE
> >>
> >>
> >>
> >> "George Lee" <GeorgeLee@discussions.microsoft.com> schreef in bericht
> >> news:1BE30C66-5722-4A39-80B1-574C09B371CE@microsoft.com...
> >> >I am trying to port a VBA feature as a VBScript on a Web Page. I keep
> >> >getting
> >> > an "ActiveX object can't create object: 'Word.Application'. Is this a
> >> > reference problem? How do you point the page to the where the Word
> >> > reference
> >> > is?
> >>
>