Iterating subwebs

A

Abhi

I am using FP OM to iterate and list web folders/files. Is there a way I can iterate a subweb ? When I come across a WebFolder that has IsWeb flag set to true, I cannot iterate its folders/files. One way to do it would be to open the subweb and iterate it separately. But that opens another FP window and I want to avoid it if I can. Is there any other way

FP hyperlink dialog jumps over the subweb boundaries with ease. So I feel there has to be an alternative

Thanks in advance
 
J

Jim Buyens

I think you would have to open the subweb's root folder
through the file system, in typical VB6 fashion.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------


-----Original Message-----
I am using FP OM to iterate and list web folders/files.
Is there a way I can iterate a subweb ? When I come across
a WebFolder that has IsWeb flag set to true, I cannot
iterate its folders/files. One way to do it would be to
open the subweb and iterate it separately. But that opens
another FP window and I want to avoid it if I can. Is
there any other way ?
FP hyperlink dialog jumps over the subweb boundaries with
ease. So I feel there has to be an alternative.
 
A

Abhi

Thanks for your feedback. But I cannot do that. The web could be a disk web or a served web. The solution will work for disk webs but not for served webs

Another thing I noticed was that FP hyperlink dialog opens the subwebs as webs and iterates them. But somehow, it manages to do this wihout opening the WebWindow. Both Add and Open methods of the Webs collection open the WebWindow. I am looking for another method to open the web without the WebWindow. Does anyone know how to do that ?
 
J

Jim Cheshire

The second parameter of the Open method for the Webs collection is of type
FpWebOpenFlags. Setting the fpOpenNoWindow flag will do what you want.

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.



Abhi said:
Thanks for your feedback. But I cannot do that. The web could be a disk
web or a served web. The solution will work for disk webs but not for served
webs.
Another thing I noticed was that FP hyperlink dialog opens the subwebs as
webs and iterates them. But somehow, it manages to do this wihout opening
the WebWindow. Both Add and Open methods of the Webs collection open the
WebWindow. I am looking for another method to open the web without the
WebWindow. Does anyone know how to do that ?
 
A

Abhi

Thanks for the feedback. I didn't realize that parameter because I am looking at FP2k OM as I need my addin to be compatible with FP2k. How do I do it in FP2k ?
 
J

Jim Cheshire

Abhi,

When you snip the original messages, no one can remember what has been said
before. Can you repost with the original messages intact?

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.



Abhi said:
Thanks for the feedback. I didn't realize that parameter because I am
looking at FP2k OM as I need my addin to be compatible with FP2k. How do I
do it in FP2k ?
 
A

Abhi

Thanks for the feedback. I didn't realize that parameter because I am looking at FP2k OM as I need my addin to be compatible with FP2k. How do I do it in FP2k


----- Jim Cheshire wrote: ----

The second parameter of the Open method for the Webs collection is of typ
FpWebOpenFlags. Setting the fpOpenNoWindow flag will do what you want

--
Jim Cheshir
Jimc
http://www.jimcoaddins.co
===============================
Author of Special Editio
Using Microsoft Office FrontPage 200
5 Stars on Amazon and B&
===============================
The opinions expressed by me in th
newsgroups are my own opinions an
are in no way associated with m
employer or any other party. Jimco i
not associated in any way with any othe
entity



Abhi said:
Thanks for your feedback. But I cannot do that. The web could be a dis
web or a served web. The solution will work for disk webs but not for serve
webswebs and iterates them. But somehow, it manages to do this wihout openin
the WebWindow. Both Add and Open methods of the Webs collection open th
WebWindow. I am looking for another method to open the web without th
WebWindow. Does anyone know how to do that
 
J

Jim Cheshire

Do it in a new WebWindow. Unless you explicitly make that WebWindow
visible, it won't be.

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.



Abhi said:
Thanks for the feedback. I didn't realize that parameter because I am
looking at FP2k OM as I need my addin to be compatible with FP2k. How do I
do it in FP2k ?
 
A

Abhi

Thanks once again. When I call Webs.Add/Open, a WebWindow is opened automatically. I can hide it but that will cause the window to appear for a short time and then disappear. I want to avoid that if I can
Some more observations
I created a VB app that monitors OnWebOpen event of FP app. The code looks something like
=======================================
Option Explici

Dim WithEvents oApp As Applicatio

Private Sub Form_Load(
Set oApp = Applicatio
End Su

Private Sub oApp_OnWebOpen(ByVal pWeb As FrontPage.Web
Debug.Print "web open: " & pWeb.URL & " " & (pWeb.ActiveWebWindow Is Nothing
End Su
=========================

With this app running, if I double click a subweb in FP folder list, I get a WebOpen event first with no active WebWindow and then the WebWindow is opened. Similarly if I browse to a subweb in hyperlink dialog, I get a WebOpen event with no active WebWindow and no window opens. But if I open a web programmatically ( with the command1 button above ), a WebWindow opens first and then I get a WebOpen event with a active WebWindow. This forces me to think that there has to another way to open the webs. Am I correct ? Am I missing something

Thanks in advance

Regards
Abh

----- Jim Cheshire wrote: ----

Do it in a new WebWindow. Unless you explicitly make that WebWindo
visible, it won't be

--
Jim Cheshir
Jimc
http://www.jimcoaddins.co
===============================
Author of Special Editio
Using Microsoft Office FrontPage 200
5 Stars on Amazon and B&
===============================
The opinions expressed by me in th
newsgroups are my own opinions an
are in no way associated with m
employer or any other party. Jimco i
not associated in any way with any othe
entity



Abhi said:
Thanks for the feedback. I didn't realize that parameter because I a
looking at FP2k OM as I need my addin to be compatible with FP2k. How do
do it in FP2k
 
J

Jim Cheshire

Abhi,

If you create a new WebWindow (not a new Web, but a new WebWindow), that
WebWindow will not be visible unless you explicitly set it as visible.

--
Jim Cheshire
Jimco
http://www.jimcoaddins.com
================================
Author of Special Edition
Using Microsoft Office FrontPage 2003
5 Stars on Amazon and B&N
================================
The opinions expressed by me in the
newsgroups are my own opinions and
are in no way associated with my
employer or any other party. Jimco is
not associated in any way with any other
entity.



Abhi said:
Thanks once again. When I call Webs.Add/Open, a WebWindow is opened
automatically. I can hide it but that will cause the window to appear for a
short time and then disappear. I want to avoid that if I can.
Some more observations:
I created a VB app that monitors OnWebOpen event of FP app. The code looks something like:
========================================
Option Explicit

Dim WithEvents oApp As Application

Private Sub Form_Load()
Set oApp = Application
End Sub

Private Sub oApp_OnWebOpen(ByVal pWeb As FrontPage.Web)
Debug.Print "web open: " & pWeb.URL & " " & (pWeb.ActiveWebWindow Is Nothing)
End Sub
==========================

With this app running, if I double click a subweb in FP folder list, I get
a WebOpen event first with no active WebWindow and then the WebWindow is
opened. Similarly if I browse to a subweb in hyperlink dialog, I get a
WebOpen event with no active WebWindow and no window opens. But if I open a
web programmatically ( with the command1 button above ), a WebWindow opens
first and then I get a WebOpen event with a active WebWindow. This forces me
to think that there has to another way to open the webs. Am I correct ? Am I
missing something ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top