Friedi,
The constants for the window style can be found here:
http://msdn.microsoft.com/library/de...640b0e32ea.asp
SW_SHOWMAXIMIZED = 3
Example:
objShell.Run "mk:@MSITStore:C:\MyCHM.chm::/1hh.htm", 3, False
or you can declare the constats like so:
Const SW_SHOWNORMAL = 1
Const SW_SHOWMAXIMIZED = 3
then use:
objShell.Run "mk:@MSITStore:C:\MyCHM.chm::/1hh.htm", SW_SHOWMAXIMIZED,
False
------------------------------
Although this isn't a programming newsgroup I am always here to help
Scripting newsgroups:
microsoft.public.scripting.vbscript
microsoft.public.scripting.wsh
VBA newsgroup:
microsoft.public.office.developer.vba
------------------------------
Glad to be able to help again
--
Newbie Coder
(It's just a name)
"Friedi" <(E-Mail Removed)> wrote in message
news:5A2EE2AD-D040-4F8D-BB30-(E-Mail Removed)...
> Hi Newbi
>
> Thanks - it works - opening of the file is only possible in normal
> (SW_NORMAL) not in SW maximise.
>
> It's the second time you helped me out - first time was API functions with
> VB 2005
> a few days ago.
> --
> Friedi
>
>
> "Newbie Coder" wrote:
>
> > Friedi,
> >
> > Create a new VBS File
> >
> > Paste in code below:
> >
> > ----------------------------------
> >
> > ' Written By Newbie Coder For 'Friedi'
> > Option Explicit
> >
> > Dim objShell
> >
> > Set objShell = CreateObject("WScript.Shell")
> >
> > On Error Resume Next
> >
> > objShell.Run "mk:@MSITStore:C:\MyCHM.chm::/1hh.htm", 1, False ' 1 =
> > SW_NORMAL | False = don't wait for exit
> >
> > Set objShell = Nothing
> >
> > -------------------------------------
> >
> > Change the RUN line to point to your CHM file & point it to the HTM page
you
> > want open. If you put a '#' after then the name of the anchor you will
then
> > jump to that anchor on the page specified. Example:
> >
> > objShell.Run "mk:@MSITStore:C:\MyCHM.chm::/1hh.htm#MyAnchor", 1, False
> >
> > I hope this helps,
> >
> > --
> > Newbie Coder
> > (It's just a name)
> >
> >
> >
> >
> > "Friedi" <(E-Mail Removed)> wrote in message
> > news:6FE68B8D-3F25-4587-A35A-(E-Mail Removed)...
> > > I want it in VBScript - as I said, in VBA it my examply given with the
> > > declare function it works perfectly - I want to call with VBscript out
of
> > a
> > > helpfile .chm a particular page, as example below:
> > >
> > > ex: "How to work with script (this is the helpfile.chm) page 2 (this
page
> > I
> > > want) - Title of Page = for advanced users"
> > >
> > > My question is: How do I get page 2 (open it) with VBScript, clicking
on
> > the
> > > 'ok' button of a msgbox- within the vbscript?
> > >
> > > --
> > > Friedi
> > >
> > >
> > > "Newbie Coder" wrote:
> > >
> > > > Friedi,
> > > >
> > > > Do you want VB Script or do you want VBA?
> > > >
> > > > --
> > > > Newbie Coder
> > > > (It's just a name)
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Friedi" <(E-Mail Removed)> wrote in message
> > > > news:794DECFD-DBA2-41A1-B986-(E-Mail Removed)...
> > > > > Hi there,
> > > > > Usually we programm under VBA - but now need to know how to call a
> > HTML
> > > > > Helpfile with VB Scripting.
> > > > > The Declare function which works perfectly with VBA: (example)
> > > > > "Declare Function HTMLHelp Lib "HHCtrl.ocx" Alias "HtmlHelpA"
(ByVal
> > > > > hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As
Long,
> > > > dwDataq
> > > > > As Any) As Long"
> > > > > doesn't work at all with VBScript. Therefore I can't make the Call
> > > > > Statement. Does anybody know how to call a Helpfile?
> > > > > --
> > > > > Thanks for input
> > > > > Friedi
> > > >
> > > >
> > > >
> >
> >
> >