documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes...
Transcript of documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes...
![Page 1: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/1.jpg)
FrontPageWebObjectModelApplicationSystem ThemesTheme
WebsWebListsNavigationNodeWebFileMetaTags
NavigationNodesPropertiesWebFilesWebFileMetaTags
WebFolderListListFields
WebFolders
WebWindowsWebWindowPageWindowsPageWindowWebFile
WebListsNavigationNodeNavigationNodesPropertiesWebFilesWebFolderWebFolders
Legend
ObjectandcollectionObjectonly
OthernotablemembersoftheFrontPageobjectmodel.
![Page 2: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/2.jpg)
BasicListListFieldsWebListsNavigationNodeWebFile
NavigationNodesPropertiesThemesTheme
WebFilesWebFile
WebFoldersWebWindowsWebWindow
WebFolderListPropertiesWebFilesWebFile
WebFolders
DocumentLibraryListFieldsWebListsNavigationNodeWebFile
NavigationNodesPropertiesThemesTheme
WebFilesWebFile
WebFoldersWebWindowsWebWindow
WebFolderListPropertiesWebFilesWebFile
WebFolders
PageWindowExWebListsNavigationNodeNavigationNodesPropertiesThemes
WebFilesWebFolder
WebFoldersWebWindows
WebFileMetaTagsNavigationNode
Properties
![Page 3: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/3.jpg)
NewWebObjectModelObjectsVisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithMicrosoftOfficeFrontPage2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsobjectsaddedtotheOfficeFrontPage2003objectmodel.
Object Description
Discussion ContainsinformationaboutaDiscussionlistinaMicrosoftFrontPageWebsite.
ListFieldAttachmentsContainsinformationabouttheattachmentsfieldwhenattachmentsareenabledforalistinaFrontPageWebsite.
ListFieldRatingScale ContainsinformationabouttheratingscalelistfieldforasurveylistinaFrontPageWebsite.
WebPackage RepresentsaWebpackagethathasbeencreatedinMicrosoftVisualBasicforApplications.
![Page 4: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/4.jpg)
NewWebObjectModelProperties(AlphabeticalList)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithMicrosoftOfficeFrontPage2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheOfficeFrontPage2003objectmodel(sortedalphabetically).
NewProperty Object(s)
AllowAttachments BasicList,DocumentLibrary,List,Survey,Discussion
AllowFillInChoices ListFieldChoice
AllowModerate BasicList,DocumentLibrary,List,Survey,Discussion
AllowRichHTML ListFieldMultiLineAuthor WebPackageCompany WebPackageComputationFormula ListFieldComputedDynamicTemplate WebFileEndNumber ListFieldRatingScale
IsHidden BasicList,DocumentLibrary,List,Survey,Discussion
IsModified BasicList,DocumentLibrary,List,Survey,Discussion
OptimizeHTMLFlags ApplicationOptimizeHTMLPublishFlagsWeb,WebExReturnType ListFieldComputedStartNumber ListFieldRatingScaleSubject WebPackage
![Page 5: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/5.jpg)
![Page 6: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/6.jpg)
NewWebObjectModelProperties(byObject)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithMicrosoftOfficeFrontPage2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheOfficeFrontPage2003objectmodel(sortedbyobjectname).
Object NewPropertiesOptimizeHTMLFlags
BasicList AllowAttachments,AllowModerate,IsHidden,IsModified
Discussion AllowAttachments,AllowModerate,IsHidden,IsModified
DocumentLibrary AllowAttachments,AllowModerate,IsHidden,IsModified
List AllowAttachments,AllowModerateListFieldChoice AllowFillInChoicesListFieldComputed ComputationFormula,ReturnTypeListFieldMultiLine AllowRichHTMLListFieldRatingScale EndNumber,StartNumberList IsHidden,IsModified
Survey AllowAttachments,AllowModerate,IsHidden,IsModified
WebEx OptimizeHTMLPublishFlagsWebFile DynamicTemplateWeb OptimizeHTMLPublishFlagsWebPackage Author,Company,Subject
![Page 7: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/7.jpg)
![Page 8: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/8.jpg)
NewWebObjectModelMethods(AlphabeticalList)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithMicrosoftOfficeFrontPage2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsmethodsaddedtotheOfficeFrontPage2003objectmodel(sortedalphabetically).
NewMethod ObjectApplyDynamicTemplate WebFile
ConvertToField
ListField,ListFieldChoice,ListFieldComputed,ListFieldCounter,ListFieldCurrency,ListFieldDateTime,ListFieldFile,ListFieldInteger,ListFieldLookup,ListFieldMultiLine,ListFieldNumber,ListFieldSingleLine,ListFieldTrueFalse,ListFieldURL,ListFieldAttachments,ListFieldRatingScale
CreateDynamicTemplateState ApplicationCreatePackage Web,WebExCreateSearchInfo ApplicationDecodeURL ApplicationEncodeURL ApplicationImportWebPackage Web,WebExRemove WebPackageShowBordersShadingDialog ApplicationShowFontDialog ApplicationShowHTMLDialog ApplicationShowHyperlinkParameters Application
![Page 9: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/9.jpg)
ShowImportWebPackageDialog ApplicationShowPickURLDialog ApplicationShowPositionDialog ApplicationSplitArgs ApplicationUpdateDynamicTemplate Web,WebEx,WebFile
![Page 10: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/10.jpg)
NewWebObjectModelMethods(byObject)VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetworkWebsiteforthelatestinformationaboutprogrammingwithMicrosoftOfficeFrontPage2003,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsmethodsaddedtotheOfficeFrontPage2003objectmodel(sortedbyobjectname).
NewMethod ObjectDecodeURL
Application
CreateDynamicTemplateState,CreateSearchInfo,EncodeURL,ShowBordersShadingDialog,ShowFontDialog,ShowHTMLDialog,ShowHyperlinkParameters,ShowImportWebPackageDialog,ShowPickURLDialog,ShowPositionDialog,SplitArgs
ListFieldAttachments ConvertToFieldListFieldChoice ConvertToFieldListFieldComputed ConvertToFieldListField ConvertToFieldListFieldCounter ConvertToFieldListFieldCurrency ConvertToFieldListFieldDateTime ConvertToFieldListFieldFile ConvertToFieldListFieldInteger ConvertToFieldListFieldLookup ConvertToFieldListFieldMultiLine ConvertToFieldListFieldNumber ConvertToFieldListFieldRatingScale ConvertToField
![Page 11: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/11.jpg)
ListFieldSingleLine ConvertToFieldListFieldTrueFalse ConvertToFieldListFieldURL ConvertToFieldWeb CreatePackage
WebEx CreatePackage,ImportWebPackage,UpdateDynamicTemplate
WebFile ApplyDynamicTemplate,UpdateDynamicTemplateWeb ImportWebPackageWebPackage RemoveWeb UpdateDynamicTemplate
![Page 12: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/12.jpg)
CreatingWebSitesSomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
MicrosoftFrontPagemakesFrontPage-basedWebsitecreationaseasyascreatinganewfolderonyourharddrive.ThekeytosuccessfulWebsitemanagementinFrontPageisplanningthestructureanddesignofyourWebsites.WithmostWebservers,youhaveoneWebsite,butwithFrontPage,youcancreateasmanyWebsitesasyouwant,includingnestedWebsites,calledsubsites.AFrontPage-basedWebsitecomprisesthreelayers—Websitestructure,folderstructure,andnavigationstructure.Clickoneofthelinksbelowtoselectaspecifictopic.
UnderstandingFrontPageWebstructure
UnderstandingFrontPagefolderstructure
Understandingnavigationstructure
CreatingWebsitesprogramatically
CreatingaWebsitewiththeAddmethod
CreatingaWebsitewiththeMakeWebmethod
![Page 13: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/13.jpg)
UnderstandingFrontPageWebstructure
AnyfolderonyourWebservercanbeaWebsitewithitsownfolderhierarchythatcanincludesubsitesbelowtheoriginalWebsite.WhenyouinstallFrontPage,theprogramautomaticallyprovidesadefaultnameforyourmainWebsite.Onadisk-basedsystem,thedefaultnameisC:\DocumentsandSettings\username\MyDocuments\MyWebSitesforMicrosoftWindowsXP.Youmaywanttonametheindividualsubsitesforthevariouscompanynamesthemselves,suchasAdventureWorks,AmericanSocietyofScience,MightyflightToys,orCohoWinery.
FrontPageprovidesavarietyofWebsitetemplates—corporate,discussion,customersupport,andsoon.ThesetemplatesprovidethefoundationofthestructureforeachWebsite.Forexample,AdventureWorksmaywantyoutoestablishafull-blowncorporatepresencefortheirWebsite;andsoon.TheWebsitehierarchyforadisk-basedWebsiteisshowninthefollowingdiagram.
ThefollowingfigureshowstheWebsitestructureinFoldersview.Thesubsitesdisplayasmallglobewithinthefoldericon.
![Page 14: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/14.jpg)
UnderstandingFrontPagefolderstructure
ThefolderstructureinFrontPagebehavesinthesamemannerasthefolderstructureinWindowsExplorer.However,toaccessthesefilesfromWindowsExplorer,youhavetoexportthemtoanotherlocation—eitheryourharddriveorserver.Duringtheexportprocess,thefilesareconvertedtoHTMLpages.Inthatsense,openingFrontPageissimilartoopeningawindowtoyourWebsites.Thefolderhierarchyforadisk-basedWebsiteisshowninthefollowingdiagram.
ThefollowingdiagramshowsthefolderstructureinFoldersview.
NoteThisdiagramdisplaysthesameinformationasthepreviousonebecausebothfoldersandWebsitesaredisplayedinthesameview,butyoucanseefromtheWebsiteandfolderdiagramsthattheyeachhavetheirownstructure.AWebsiteorsubsiteisafolder.However,afolderthatisalsoaWebsitecontainsmetadataaboutthatWebsite.Forexample,ifyouapplyathemetooneofyourWebsites,allfolderswithinthatWebsitewillhavethesametheme.However,youcanapplydifferentthemestotheWebsitesonyourWebserver.WhenyouchangeaWebsitetoafolder,youremovespecialsettingsthatmakethatfolderaWebsite,andsettingssuchasthethemechangetomatchthe"global"themeforthedisk-basedorserver-basedWebsitethatprovidesthecontainerforyour
![Page 15: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/15.jpg)
FrontPage-basedsubsites.
![Page 16: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/16.jpg)
Understandingnavigationstructure
YoucancreatefileswithinyourWebsite,butthenavigationstructurethatlinksthesefilestoyourWebsiteisn'tautomaticallycreatedwhenthefilesarecreated.However,eachsubsitecanhaveitsownhomepage.AhomepageisusuallythestartingpageforanyWebsiteinthenavigationstructure;butinFrontPageyoucancreatealternatepagesthatexistatthesamenavigationlevelasthehomepage.Youmaywanttoaddlinkstoahomepagethatnavigatetothehomepagesofothersubsitesthatyou'remaintaining.
Thenavigationstructurecontainsnodesthatlinkeachofthepagesinyoursubsitesandprovidepointerstothelocationsofeachpageinthenavigationstructure.Thenavigationstructureforadisk-basedWebsiteisshowninthefollowingdiagram.
ThefollowingdiagramshowsthenavigationstructureinNavigationview.
![Page 17: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/17.jpg)
CreatingWebsitesprogrammatically
Here'saverysimpledesignforaWebsite.TheCohoWinerycompanywantstoaddasubsitecalledWinesAroundtheWorldthatwillstartwithpagesfortworegions,SpainandFrance.ThefolderstructurewillcontaintheCohoWineryWebsiteandthefolderforthesubsite,WinesAroundtheWorld,plusthehiddenfolder_private,andanImagesfolder.ThenavigationstructurewillcontaintheWinesAroundtheWorldhomepage(index.htm)andthetwochildpages(Spain.htmandFrance.htm—theleftandrightnodesinthenavigationstructure).
TherearetwowaystocreateFrontPage-basedWebsitesinMicrosoftVisualBasicforApplications.YoucanusetheAddmethodwiththeWebscollection,oryoucanusetheMakeWebmethodwithaWebFolderobjecttochangeanexistingfolderintoaWebsite.
![Page 18: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/18.jpg)
CreatingaWebsitewiththeAddmethod
Onceyou'vedesignedhowyourWebsiteisgoingtolookandfunction,youcanusetheSetstatementasshownintheprocedurebelowtocreateanewWebsite.
NoteToruntheexamplesinthistopic,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\CohoWinery",oryoumaysubstituteaWebsiteandfilesofyourchoice.
PrivateSubAdd()
DimmyNewWebAsWebEx
SetmyNewWeb=_
Webs.Add("C:\MyWebSites\CohoWinery\WinesAroundtheWorld")
EndSub
WhenyoucreateaWebsitewiththismethod,youonlycreatetheWebsiteanditsfolder;youdon'tcreateacompleteWebsitewithallofthefolders,pages,andnavigationinplace.Thenextstepisaddingahomepage.Thefollowingexampleaddsahomepage.
PrivateSubAdd()
DimmyNewWebAsWebEx
DimmyFilesAsWebFilesDimmyUrlAsString
SetmyNewWeb=_
Webs.Add("C:\MyWebSites\CohoWinery\WinesAroundtheWorld")
SetmyFiles=myNewWeb.RootFolder.FilesmyFileUrl=_
"C:\MyWebSites\CohoWinery\WinesAroundtheWorld\index.htm"
myFiles.Add(myFileUrl)
EndSub
Becauseindex.htmordefault.htmarefilenamesassociatedwithnamescommonlyusedashomepages,FrontPagecreatestheappropriatenavigationstructureforahomepagewheneveryouuseoneofthesenames.However,ifyouaddfurtherpagesusingtheAddmethodwiththeWebFileobject,youwilladdpages,butFrontPagewillnotautomaticallycreatethenavigationstructureforyou—youwillhavetoaddthenavigationstructuremanuallyasisillustratedinthefollowingexample.
NoteThefollowingexamplecreatesanewsubsiteintheCohoWineryWebsite
![Page 19: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/19.jpg)
andcreatestwopagesinthenewsubsite:index.htmandSpain.htm.
PrivateSubAddCompleteWeb()
DimmyNewWebAsWebEx
DimmyFilesAsWebFiles
DimmyUrlAsString
DimmyFileOneAsString
SetmyNewWeb=_
Webs.Add("C:\MyWebSites\CohoWinery\WinesAroundtheWorld")
SetmyFiles=myNewWeb.RootFolder.Files
myFileUrl=_
"C:\MyWebSites\CohoWinery\WinesAroundtheWorld\index.htm"
myFiles.Add(myFileUrl)
myFileOne="C:\MyWebSites\CohoWinery\WinesAroundtheWorld\"
myFileOne=myFileOne&"Spain.htm"
myFiles.AddmyFileOne
CallmyNewWeb.HomeNavigationNode.Children.Add(myFileOne,"Spain",_
fpStructLeftmostChild)
myNewWeb.ApplyNavigationStructure
EndSub
Noticethelaststatement—theApplyNavigationStructuremethodappliesthechangesthatyou'vemadetothenavigationstructure.
ThereareseveralconstantsyoucanuseintheAddmethodfortheChildrenproperty:fpStructBaseOnSibling,fpStructLeftmostChild,andfpStructRightmostChild.Verysimply,theseconstantsinformFrontPagewhichpositionyouwanttoapplytothefileinthenavigationstructure—left,right,orbasethepositionononeofthesiblings.Here,myFileOnebecomestheleftmostchildofthehomepage.Thenextstepistoaddthenextpage,sothatyoucanviewthenavigationstructureinNavigationview.ThefollowingaddsanotherpageandnavigationnodetothepreviousWebsite.
PrivateSubAdd()
DimmyNewWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileUrlAsString
DimmyFileOneAsString
DimmyFileTwoAsString
SetmyNewWeb=_
Webs.Add("C:\MyWebSites\CohoWinery\WinesAroundtheWorld")
SetmyFiles=myNewWeb.RootFolder.Files
![Page 20: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/20.jpg)
myFileUrl=_
"C:\MyWebSites\CohoWinery\WinesAroundtheWorld\index.htm"
myFiles.Add(myFileUrl)
myFileOne="C:\MyWebSites\CohoWinery\WinesAroundtheWorld\"
myFileOne=myFileOne&"Spain.htm"
myFileTwo="C:\MyWebSites\CohoWinery\WinesAroundtheWorld\"
myFileTwo=myFileTwo&"France.htm"
myFiles.AddmyFileOne
myFiles.AddmyFileTwo
CallmyNewWeb.HomeNavigationNode.Children.Add(myFileOne,"Spain",_
fpStructLeftmostChild)
CallmyNewWeb.HomeNavigationNode.Children.Add(myFileOne,"Spain",_
fpStructRightmostChild)
myNewWeb.ApplyNavigationStructure
EndSub
YoucancontinuetoaddpagesandnavigationnodestoyourWebsiteinthiswayuntilyourWebsiteiscomplete.Or,youcancreateaForloopwhereyouiteratethroughtheWebsiteaddingthenumberofpagesandnavigationnodesyouneedtocompletetheWebsite.ThefollowingexampleaddsfivepagesandnavigationnodestoanewsubsiteintheCohoWineryWebsite.
NoteCreating,moving,ordeletingfilesandfolderswhileattemptingtomodifythenavigationstructuremaycausesomechangestobelost.First,makethechangestothefolderstructureoftheWebsite,thenmakethenavigationstructurechanges,andthenapplythenavigationstructuretotheWebsite.
PrivateSubAddDesignerCrystalWeb()
DimmyWebAsWebEx
DimmyParentWebAsWebEx
DimmyFoldersAsWebFolders
DimmyFolderAsWebFolder
DimmyFilesAsWebFiles
DimmyNewFiles(4)AsWebFiles
DimmyChildNodeAsNavigationNode
DimmyNewFilenameAsString
DimmyFileURLAsString
DimmyCountAsInteger
DimmyBaseURLAsString
DimmyWebURLAsString
DimmyInputMsgAsString
DimmyExistAsBoolean
![Page 21: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/21.jpg)
SetmyParentWeb=_
Webs.Open("C:/MyDocuments/MyWebSites/CohoWinery/")
myParentWeb.Activate
myBaseURL="C:/MyDocuments/MyWebSites/CohoWinery/"
myWebURL=myBaseURL&"CohoWineryDesignerCrystal"
myExist=False
myInputMsg=_
"Allfileswillhave"".htm""appended.Typeafilename:"
SetmyFolders=Webs(0).RootFolder.Folders
ForEachmyFolderInmyFolders
'ChecktoseeifmyWebURLalreadyexists.
IfmyFolder.IsWebAndmyFolder.Url=myWebURLThen
myExist=True
EndIf
Next
'CreatemyWebURLifitdoesn'texist.
IfmyExist=FalseThenWebs.Add(myWebURL).Activate
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
'Createfiles.
FormyCount=0ToUBound(myNewFiles)
myNewFilename=InputBox(myInputMsg)
myFileURL=myWeb.Url&"/"&myNewFilename&".htm"
myFiles.AddmyFileURL
myFiles(myFileURL).Edit
Next
'Addtonavigationstructure.
FormyCount=0ToUBound(myNewFiles)
'Checkifthecurrentpageisindex.htm,ifso,skipit.
IfmyFiles(myCount).Title="index.htm"Then
myCount=myCount+1
EndIf
SetmyChildNode=_
myWeb.RootNavigationNode.Children(0)
'Addnavigationnodetothecurrentpage.
myChildNode.Children.AddmyFiles(myCount).Url,_
myFiles(myCount).Title,fpStructLeftmostChild
Next
myWeb.ApplyNavigationStructure
EndSub
![Page 22: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/22.jpg)
CreatingaWebsitewiththeMakeWebmethod
Ifyoualreadyhaveanexistingfolderthatyou'dliketoconverttoaWebsite,youcanusetheMakeWebmethodwithaWebFolderobjectasshowninthefollowingexample.
NoteThefollowingexampleassumesthatWebs(0)istheCohoWineryWebsiteandthatitcontainsafoldercalledFolderOne.
PrivateSubMakeAWeb()
DimmyWebAsWebEx
DimmyFolderAsWebFolder
SetmyWeb=Webs(0)
myWeb.Activate
SetmyFolder=ActiveWeb.RootFolder.Folders("FolderOne")
myFolder.MakeWeb
EndSub
YouwillneedtocreateanavigationstructureoncePageOneisasubsiteofCohoWinery.
![Page 23: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/23.jpg)
ExploringProceduresThistopicisdesignedtogiveuserswhomaybefamiliarwithMicrosoftFrontPage,butunfamiliarwithMicrosoftVisualBasicforApplications(VBA),abackgroundonsomeofthebasicconceptsinaFrontPage-basedprogrammingenvironment.ProgramminginFrontPageVisualBasicforApplicationsprovidesyouwithHTMLtoolsinanMicrosoftOfficeprogrammingenvironmentwhereyoucancreateproceduresthatperformataskoraseriesoftasks.Forexample,youcould:
CreateaprocedurethatretrievesdatafromaMicrosoftAccessdatabaseanddisplaysthedataonyourWebpage.PublishaMicrosoftPowerPointpresentationforautomaticupdatesovertheInternet.AutomaticallyupdateaMicrosoftExcelspreadsheetwithinputfromusersrespondingtoyourWebsite.
ThistopicprovidesinformationonthefollowingVBAprogrammingconcepts.
Organizecodeformodularuse
Typesofprocedures
Publicandprivateprocedures
Typesofprocedurecalls
Eventproceduresandarguments
CreateatableinFrontPagefromanAccessdatabase
![Page 24: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/24.jpg)
Organizecodeformodularuse
VisualBasicproceduresprovideawayfordeveloperstoorganizecodeformodularuse.Insteadofwritingthesamecalculatorfunctionoverandoverforeachprogram,youcantakethatsegmentofcode(thecalculatorfunction)andcompileitintoageneralprogram,thatcanthenbeaccessedbymanyotherprograms.InVisualBasic,ablockofcodeisenclosedbetweenaprocedureheadingandaclosurestatement—theSubandEndSubstatements.
ThebasicsyntaxofaprocedurewithinVisualBasicisshowninthefollowingcodesample.
[Private|Public|Static]Subprocedurename(arguments)
statements
EndSub
TorunanyofthecompletecodeexamplesincludedintheFrontPageVisualBasicforApplicationsonlinehelp,followthesesteps:
1. OpenFrontPage,selectMacrofromtheToolsmenu,andthenclickVisualBasicEditor.
2. Double-clickMicrosoft_FrontPage(orthecurrentproject)intheProjectwindowandexpandtheModulesfolder.
3. Double-clickModule1toopentheCodewindow.4. Copythecodeblockfromthedocumentation,andthenpasteitintothe
Codewindow.5. ClickRunSub/UserFormonthetoolbar.
YourcodewillautomaticallybesavedwhenyouclosetheVisualBasicEditor.
![Page 25: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/25.jpg)
Typesofprocedures
FrontPageVBAprovidestwotypesofprocedures,SubandFunctionprocedures.Subproceduresperformtasksbutdonotreturnanyvalues.Theymaybecalledfromothersubroutinesorexecutedinresponsetoanevent,suchasamouseclickorakeystroke.
NoteASubprocedurecanbeaneventprocedure,butitcanalsoperformataskwithoutnecessarilyrespondingtoanevent.
ThefollowingprocedureretrievestheversionnumberofFrontPagefromtheactiveWebsitebutdoesn'treturntheversionnumbertoanyotherprocedure.
SubDisplayVersion()
DimmyWebAsWebEx
DimmyVersionAsString
myVersion="FrontPageversionnumber:"&ActiveWeb.Application.Version
EndSub
AFunctionprocedurealsoperformstasks,butitcaninadditionreturnoneormorevaluesasarguments.ThefollowingcodesamplereturnstheversionnumberofFrontPagetoacallingprocedure.
FunctionReturnVersion()AsVariant
DimvarAppVersionAsVariant
varAppVersion=Application.Version
ReturnVersion=varAppVersion
EndFunction
ThevariableReturnVersionnowcontainstheversionnumberofFrontPage.Toaccessthisvalueinthecallingprocedure,youcouldwritecodesimilartothefollowingsample.
SubGetAppVersion()
DimmyAppVersionAsVariant
MsgBox"ThisversionofFrontPageisversion"_
&ReturnVersion
EndSub
Alternatively,youcouldassigntheexpressionReturnVersiontoavariableand
![Page 26: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/26.jpg)
appendthevariabletothemessageboxstatementinsteadofthefunctioncall.
BothSubandFunctionprocedurescanbecalledtoperformtheirtasks,dependingonwhethertheproceduresaredeclaredPublicorPrivate.
AmacroisathirdtermusedtodescribecodeinVBA.AsapublicSubprocedurethatdoesn'ttakearguments,amacromayormaynotcallotherSuborFunctionproceduresandcanbeassignedtocommandbarsandshortcutkeysorrunfromtheMacrodialogbox.
![Page 27: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/27.jpg)
Publicandprivateprocedures
VisualBasicprovidestwowaystoaccessaprocedure.Bydefault,proceduresarepublic—theycanbecalledfromanyotherprocedureinanymodulewithinyourapplication.Forexample,ifyou'vewrittenaprocedurethatlistsimagesbyfilenameonaWebpage,youwouldwanttodeclarethatprocedurepublicsothatyoucoulduseitacrossallofyourWebsites.However,ifyou'vewrittenaprocedurethateditsaspecificdatabase,youwouldwantthatproceduretobeavailableonlytothemodulethathandleseditingthedatabase—inthatcase,youcandeclaretheprocedureprivate.Proceduresthathavebeendeclaredprivatecanonlybereferencedbyotherprocedureswithinthesamemodule.Thefunctionshownpreviouslyhasbeendeclaredapublicfunctioninthefollowingcodesampleandcanbecalledacrossmodulesandprojects.
PublicFunctionReturnVersion()AsVariant
statements
EndFunction
Incontrast,aprocedurethatisusedtoeditadatabaseshouldbedeclaredprivate.
PrivateFunctionEditCustomerName(strFirstNameAsString)
statements
EndFunction
![Page 28: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/28.jpg)
Typesofprocedurecalls
Howdoyouprogrammaticallyrunaprocedure?Youdeclareitthesamewaythatyouwoulduseakeyword,suchasOpen.ThefollowingprocedurecallstheReturnVersionfunctionandassignsthereturnedvaluetoalocalvariable,MyVersion,forthevaluethatispassedtotheprocedure.
SubTestCall()
DimMyVersionAsVariant
MyVersion=ReturnVersion
EndSub
Ifyoudidn'thaveanyinformationtopassfromoneproceduretoanother,youwouldsimplydeclaretheprocedurename,asshowninthefollowingcodesample.
SubTestCall2()
DisplayCompanySplashScreen
EndSub
TheTestCall2procedurecallsanotherprocedure,DisplayCompanySplashScreen,whichdoesn'ttakeanyargumentsorreturnanyvalues.
![Page 29: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/29.jpg)
Eventproceduresandarguments
Ifyouwantanevent,suchasclickingacommandbutton,totriggertheexecutionofcodeincaseswhereyouwouldusuallypassavalueintothecallingprocedure,youcanexecutetheresultsfromthefunctionratherthanreturntheresults.InthiscasetheReturnVersionfunctionbecomesasubroutineandinitiatesthedisplayoftheversionnumberfortheapplication.
SubReturnVersion()
DimvarAppVersionAsVariant
varAppVersion=Application.System.Version
DisplayMsgBoxvarAppVersion
EndSub
TheDisplayMsgBoxsubroutineshowninthefollowingcodesampledisplaysthecontentsofthevariablevarGotAppVersionthatwaspassedfromtheReturnVersionsubroutine.
SubDisplayMsgBox(varGotAppVersionAsVariant)
DimvarDisplayAppVersionAsVariant
varDisplayAppVersion=varGotAppVersion
MsgBox"Thisapplicationisversion"_
&varDisplayAppVersion
EndSub
AneventprocedurecannowinitiatethedisplayofthevaluethatispassedfromtheReturnVersionsubroutine.
PrivateSubCommandButton1_Click()
ReturnVersion
EndSub
![Page 30: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/30.jpg)
CreateatableinFrontPagefromanAccessdatabase
ThefollowingprocedurecombinesobjectsfromthePageobjectmodelandtheWebobjectmodeltoretrievedatafromanopenMicrosoftAccessdatabaseandinsertitintoatableonaFrontPage-basedWebpage.TheParseDBTableprocedureprovidestheparametersfortheParseAccessTablefunctionwhichcallsthefollowingfunctionstocreateandpopulatethetable:
AddDBTableToPage—createsanewtableAddDBRow—insertsarowontotheWebpageAddMemo—retrievesthememosfromtheAccessdatabase,returnsthemasbookmarksatthebottomofthepagebelowthenewtable,andreturnstheURLtothebookmark
NoteTheAccessdatabase,Northwind.mdb,wasusedforthisexample.Toruntheexample,youmusthavereferencesintheVisualBasicEditortotheMicrosoftDAO3.6ObjectLibraryandtheMicrosoftAccessObjectLibrary.YoumustalsoopenanAccessdatabasebeforerunningtheexample,andyoumustaddablanktemporaryfilecalledtmp.htmintheactiveWebsite.IfyouuseadatabaseotherthanNorthwind.mdb,youmustspecifythedatabasenameandtableintheParseDBTableprocedure.
FunctionAddDBTableToPage(myPageAsPageWindowEx,_
myTableNameAsString,myFieldsAsInteger)
DimmyTableAsFPHTMLTable
DimmyHTMLStringAsString
DimmyCountAsInteger
myHTMLString="<tableborder=""2""id=""myRecordSet_"&_
myTableName&""">"&vbCrLf
myHTMLString=myHTMLString&"<tr>"&vbCrLf
FormyCount=1TomyFields
myHTMLString=myHTMLString&"<tdid=""myDBField_"&_
myCount&"""></td>"&vbCrLf
NextmyCount
myHTMLString=myHTMLString&"</tr>"&vbCrLf
myHTMLString=myHTMLString&"</table>"&vbCrLf
CallmyPage.Document.body.insertAdjacentHTML("BeforeEnd",_
myHTMLString)
![Page 31: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/31.jpg)
EndFunction
FunctionAddDBRow(myDBTableAsFPHTMLTable)
DimmyHTMLStringAsString
DimmyTableRowAsFPHTMLTableRow
SetmyTableRow=myDBTable.rows(0)
myHTMLString=myTableRow.outerHTML
CallmyDBTable.insertAdjacentHTML("BeforeEnd",myHTMLString)
EndFunction
FunctionAddMemo(myCurrentPageAsPageWindowEx,myDBMemoAsString,_
myBkMarkFieldAsString,myIndex)AsString
DimmyHTMLStringAsString
DimmyMemoBkMarkAsString
DimmyBookMarkAsFPHTMLAnchorElement
myMemoBkMark=myBkMarkField&"_"&myIndex
myHTMLString="<aname="""&myMemoBkMark&""">Memo#"&_
myIndex&"</a>"&vbCrLf
'Addthebookmarktothepage.
CallmyCurrentPage.Document.body.insertAdjacentHTML("BeforeEnd",_
myHTMLString)
SetmyBookMark=myCurrentPage.Document.all(myMemoBkMark)
'Addthememotexttothepage.
CallmyCurrentPage.Document.body.insertAdjacentHTML("BeforeEnd",_
myDBMemo)
AddMemo="<ahref=""#"&myBookMark.Name&""">"
EndFunction
FunctionParseAccessTable(myDBNameAsString,myTableNameAsString)
'Access/DAODeclarations.
DimmyDBAppAsAccess.Application
DimmyRecordSetAsDAO.recordset
DimmyDBFieldAsDAO.Field
'FrontPagePageobjectmodeldeclarations.
DimmyPageAsPageWindowEx
DimmyTableAsFPHTMLTable
DimmyTableRowAsFPHTMLTableRow
DimmyTableCellAsFPHTMLTableCell
![Page 32: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/32.jpg)
'Functiondeclarations.
DimmyCountAsInteger
DimmyFieldValueAsString
DimmyRecordCountAsInteger
myRecordCount=0
'Functionconstants.
ConstmyTempPage="tmp.htm"
'GetthecurrentAccessdatabase.
OnErrorGoToAccessNotThereYet
SetmyDBApp=GetObject(,"Access.Application")
'Getthedatabasetable.
OnErrorResumeNext
SetmyRecordSet=myDBApp.CurrentDb.OpenRecordset(myTableName)
'AddanewpagetothecurrentWebsite.
SetmyPage=ActiveWeb.LocatePage(myTempPage)
myPage.SaveAsmyTableName&".htm"
'DeletethetemporaryfilefromWebsite.
ActiveWeb.LocatePage(myTempPage).File.Delete
'Addadatabase-readytabletothepagewiththepropernumberoffields.
AddDBTableToPagemyPage,myTableName,myRecordSet.Fields.Count
'Getareferencetothetable.
SetmyTable=myPage.Document.all.tags("table").Item(0)
'Populatethefirstrow.
FormyCount=0TomyRecordSet.Fields.Count-1
myTable.rows(0).cells(myCount).innerHTML="<b>"&_
Trim(myRecordSet.Fields(myCount).Name)&"</b>"
Next
'Populatetherestofthetable.
WhileNot(myRecordSet.EOF)
AddDBRowmyTable
SetmyTableRow=myTable.rows(myTable.rows.Length-1)
FormyCount=0TomyRecordSet.Fields.Count-1
SetmyTableCell=myTableRow.cells(myCount)
IfIsNull(myRecordSet.Fields(myCount))Then
myFieldValue="None"
Else
myFieldValue=Trim(myRecordSet.Fields(myCount).Value)
![Page 33: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/33.jpg)
EndIf
IfmyRecordSet.Fields(myCount).Type=DAO.dbMemoThen
myFieldValue=AddMemo(myPage,_
myRecordSet.Fields(myCount).Value,_
myRecordSet.Fields(myCount).Name,myRecordCount)
EndIf
myTableCell.innerHTML=myFieldValue
NextmyCount
myRecordSet.MoveNext
myRecordCount=myRecordCount+1
Wend
myPage.Save
myDBApp.Quit
ExitFunction
AccessNotThereYet:
Debug.PrintErr.Number&":"&Err.Description
Resume
EndFunction
PrivateSubParseDBTable()
CallParseAccessTable("Northwind.mdb","Products")
EndSub
![Page 34: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/34.jpg)
SharingProgrammingProjectsMicrosoftFrontPagedoesn'tprovidetheabilitytocreatemultipleprojects,sosharingaprojectmaybealittleconfusingatfirstglance.YoucanshareyourMicrosoftFrontPageprojectsusingoneofthefollowingtwomethods:
AsaComAddIn.Byexportingthe.bas,.cls,and.frmmodulestoadirectoryonyourharddrive(oraserverlocation)sothattheusercanimportthemodulestotheirprojectinFrontPage.
![Page 35: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/35.jpg)
SharingasaCOMAddIn
ForadetaileddescriptionofhowtodevelopaCOMadd-inforFrontPage,seetheFrontPageSoftwareDeveloperKit,whichyoucanviewonlineordownloadfromtheMicrosoftDeveloperNetworkWebsite.
![Page 36: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/36.jpg)
Sharingbyexportingtheproject
YoucanexportyourmodulesfromtheVisualBasicEditorbyselectingthemoduleintheProjectwindowandthenpointingtoExportFileontheFilemenu.IntheExportFiledialogbox,selectthedirectoryyouwantthefiletoresideinandFrontPagetakescareoftherest.
NoteWhenexportingUserFormfiles,youmustalsoincludethe.frxfile.Thisfileisusedduringtheimportprocessanddoesnotneedtobeimported,butdoesneedtobeavailableinthesamedirectoryastheothermodules.
![Page 37: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/37.jpg)
UnderstandingAbsoluteandRelativeURLAddressinginMicrosoftFrontPageMicrosoftFrontPageusesabsoluteURLaddressing.However,FrontPagedoesprovideawaytochangetheaddressingofURLsbetweenabsoluteandrelativeaddressingthroughtheMakeRelandMakeAbsmethods.
![Page 38: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/38.jpg)
WhatisanabsoluteURL?
AURLdefinesthelocationofanobject.WhenaURLisabsolute,itdefinesunambiguouslywheretheobjectislocated.Forexample,http://www.microsoft.com/FrontPage/default.htmistheexactlocationofthewelcomepageforMicrosoftFrontPage.Theobject,default.htm,isstoredintheFrontPagefolderorWebsubsiteontheWebserver,www.microsoft.com.
Adisk-basedWebsitethatcontainsyourWebsitesonyourharddrivemighthaveabaseabsoluteURLsuchasfile:///C:/MyDocuments/MyWebSites,file:///C:/WINNT/Profiles/yourlogonalias/Personal/MyWebSites/index.htm,orfile:///C:/DocumentsandSettings/yourlogonalias/MyDocuments/MyWebSites.
AsWebsitesareupdatedandthestructureofaWebsiteevolves,documentscanoftenbemovedfromonelocationtoanotherinaWebsite.Ifyou'reusingarelativeaddress,youmaybreaksomelinks.Forexample,ifyouhaveadocumentthathasahyperlinktoanobject,youcanuseanabsoluteURLtoensurethatthehyperlinkalwaysreferstothatobject.Forexample,adocumentsuchasfile:///C:/MyDocuments/MyWebs/mydocument.htm,maycontainanabsoluteURLthatreferstothewelcomepage,http://www.microsoft.com/FrontPage/default.htm.Ifthedocument,default.htm,ismovedtoanotherlocation,theabsoluteURLforthedocumentwillalwaysrefertotheobjectontheWebserveratwww.microsoft.cominthesubsitenamedFrontPage.IftheURLforthehyperlinktodefault.htmisarelativeaddress,thelinkcouldbebrokenifmydocument.htmismovedtoadifferentsubsiteormainWebsite.
WhatisarelativeURL?
InsteadofspecifyingeverypieceofaURLthatfullydefineshowtofindanobject,youcanabbreviateaURLtomakeit"relative"toacurrentlocation.RelativeURLsaretypicallyusedwhencreatingaWebsiteinwhichthepagesinitrefertootherpagesonthesite.Apagesuchasfile:///C:/MyDocuments/MyWebSites/mydocument.htmcanhavearelativeURLto"newdocument.htm"orto"../MyWebSites2/default.htm".Inthesetwocases,thereferredaddressesforthesefilesarefile:///C:/MyDocuments/MyWebSites/newdocument.htmandfile:///C:/MyDocuments/MyWebSites2/default.htm.NoticethatthefullWeb
![Page 39: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/39.jpg)
serverorexplicitdirectoryisn'tspecified;thelocationisbasedonwherethedocumentislocated.
RelativeURLsareveryuseful,particularlywhenconstructingasiteinoneplaceandthenpublishingittoanotherplace.Forexample,youmightnotwanttospecifyaservernamewhileauthoringaWebpage,becausetheservernamewillchangewhentheWebsiteispublished.
HowcananabsoluteURLbemaderelative?
URLscanbemaderelativeeithertoaserverortoapage.InordertomakeaURLrelativetoafolderortoaWebsite,youneedtomaketheURLrelativeeithertoaserverortoapage,becauseFrontPagewilltreattheURLasifitwerebeingmaderelativetoapageinthatfolderorWebsite.EachrelativeURL,combinedwithitsbaseURLfullyspecifieswheretheobjectislocated.
Whenyouhaveanabsoluteaddresssuchashttp://www.microsoft.com/mywebsitewithanimagefilecalledMyPicture.gifresidingintheimagesfolderontheWebsite,youcancreatearelativeURLforthataddressbydecidingwhethertherelativeaddresswillrefertoaserverorapage.Foraserver-relativeURL,you'duse"mywebsite/images/MyPicture.gif"withtheservernameasthebasefortherelativeURL,whichfullydefinesthelocationoftheobject.Forapage-relativeURL,you'duse"images/MyPicture,gif"withtheservernameandtheWebsitenameasthebasefortherelativeURL,whichfullydefinesthelocationoftheobject.Forafolder-relativeURL,you'duse"MyPicture.gif"withtheservername,Websitename,andfoldernameasthebasefortherelativeURL;thisrelativeaddressfullydefinesthelocationoftheobject.
Afolder-relativeURLcanalsobespecifiedfromadifferentfolder,forexample,"../images/MyPicture.gif"couldbeusedifthereferringdocumentwereinanothertop-levelfolderonthesameWebsiteandserver.The".."isthenotationusedtoindicateuponefolderlevelfromthecurrentURLaddress.
ProgrammaticAccesstoRelativeURLs
Onceyou'vedecidedwhethertouseserver,Website,orfolder-relativeURLs,youcandeterminewhichobjectstouse.ForserverorWebsite-relativeURLs,youwouldbeworkingwithmethodsrelatedtotheWebExobject.Forfolder-relativeURLs,youwouldbeworkingwithmethodsrelatedtotheWebFolder
![Page 40: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/40.jpg)
object.
![Page 41: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/41.jpg)
ConvertingrelativeandabsoluteURLs
RecommendeduseforFrontPageisabsoluteaddressing.However,onceyouhavespecifiedarelativeURLwithinFrontPage,youcanusetheMakeAbsmethodtoconvertitintoanabsoluteURL.Similarly,ifyouhaveanabsoluteURLandyouwanttoinsertareferenceintoadocumentasarelativeURL,youcanusetheMakeRelmethodtoconverttheaddresstoarelativeaddress.YoucanalsousetheMakeAbsandMakeRelmethodstoconvertahyperlinkforaWebEx,WebFolder,WebFileEx,NavigationNode,orIHTMLDocument2object.
![Page 42: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/42.jpg)
ExploringtheObjectModelinFrontPageTheMicrosoftFrontPageobjectmodelconsistsofthreeseparateobjectmodels—theApplicationobjectmodel,theWebobjectmodel,andthePageobjectmodelthatisbasedontheMicrosoftInternetExplorer4.0Documentobjectmodel.
TheseobjectmodelsaredesignedtoprovideWebdesignerswitharichsetofprogramminginterfacestomanageindividualHTMLdocumentsandFrontPage-basedWebsites.TheobjectmodelsparallelotherMicrosoftOfficeapplicationobjectmodelsascloselyaspossibleinordertoleveragetheexperienceandknowledgeuserscurrentlyhavewithotherprogrammableOfficeapplications.Inaddition,thePageobjectmodeliscompatiblewiththeDocumentobjectmodelofMicrosoftInternetExplorer4.0andlater.ThePageobjectmodelalsoleveragestheexperienceandknowledgeofWebdeveloperswhoprogramdynamicHTML(DHTML)usingscript.
![Page 43: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/43.jpg)
Differencesintheprogramminginterfaces
FrontPageprovidesadesign-timeuserexperienceversusarun-timeuserexperience,becauseHTMLpagesareusuallyviewedinabrowserratherthaninFrontPage.OtherOfficeapplicationsprovidearun-timeuserexperiencethatcontainsanenvironmentwherethedevelopercancreatesolutionsfortheuserthatrunwithintheapplication.WithFrontPage,youcancreateutilitiesforuseduringthedesignphaseoftheHTMLdocumentorWebsiteand,onceyouhavedesignedandbuiltyourWebsite,youcanuseMicrosoftVisualBasicScriptingEdition(VBScript),MicrosoftJScript,andDHTMLtocreateinteractiveeffectsforuseduringrun-timewhenthepageisviewedinabrowser.
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestMicrosoftFrontPagedevelopmentinformation,includingnewtechnicalarticles,downloads,samples,productnews,andmore.
![Page 44: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/44.jpg)
Applicationobjectmodelfunctionality
TheApplicationobjectisthetop-levelobjectintheWebobjectmodelhierarchyandprovidesaccesstoalloftheobjectsinFrontPage,suchastheactiveWebsite,activepage,add-ins,commandbars,system,andacollectionofWebsites.
![Page 45: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/45.jpg)
FrontPagePageobjectmodelfunctionalityandrestrictions
ThePageobjectmodelprovidesaccesstotheHTMLinapageandhasmostofthefunctionalityoftheInternetExplorerDocumentobjectmodel,withsomeexceptions.SomeobjectsandmembersoftheInternetExplorerDocumentobjectmodelprovidefunctionalitythatisonlyusefulinanInternetExplorerenvironment.ThoseobjectsandmembersarenotimplementedforuseinthePageobjectmodel.
![Page 46: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/46.jpg)
Webobjectmodelfunctionality
TheWebobjectmodelprovidesprogrammaticmanagementofmultipleFrontPage-basedWebsitesandtheircontents.ThisobjectmodelisbasedonconventionsusedbytheapplicationsintheMicrosoftOfficeSystemandMicrosoftVisualBasicforApplications(VBA).TheWebobjectmodelalsoprovidessupportforMicrosoftVisualSourceSafewhenaccessedthroughFrontPage.
![Page 47: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/47.jpg)
Objectmodelinteraction
MostoftheprogrammingforFrontPage-basedWebsiteswillcontainacombinationofWebandPageobjectmodelprogrammingelements.Foradditionalinformationandexamplesofthis,seeoneofthefollowingtopics.
AccessingFramesetswithMicrosoftVisualBasic
ModifyingPagesProgrammatically
ProgrammingDynamicElements
![Page 48: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/48.jpg)
AccessingFramesetswithMicrosoftVisualBasicFramesareanimportantpartofthedesignofaWebsite.MicrosoftFrontPageprovidessupportforprogrammingthecontentofframes.Clickoneofthefollowinglinksformoreinformationonaparticulartopic.
Exploringframes
Roleofaframeset
AccessingHTMLtags
Dynamicframesources
Iteratingallframesinapagewindow
ChangingMetatagcontenttoanothercharacterset
![Page 49: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/49.jpg)
Exploringframes
AccessingframeswithinaframesetinFrontPageisrelativelystraightforwardaslongasyoukeepinmindthateachframeaccessesitsownpageandthatyouaccessthecontentsofeachpagethroughthePageobjectmodel.ThetwowindowsinvolvedindisplayingtheframesarethePageWindowExobjectandFPHTMLWindow2objects.TheequivalentexpressionforaccessingthecontentsinthewindowassociatedwiththeactiveframeisSetmyActiveFrameInFrameset=ActivePageWindow.Document.TheActivePageWindowobjectaccessesthepagewindowfortheframe,andtheDocumentobjectaccessestheFPHTMLWindow2object.
NoteYoumaygetpermissiondeniederrorsifyoutrytoaccessobjectswhileinHTMLview.Whenyouwanttoaddcodeortexttoadocumentobject,youmustsettheFpPageViewModeconstantfortheViewModepropertytofpPageViewNormal.ThevaluefortheviewmodecannotbesettofpPageViewHtmlorfpPageViewPreview.Alternatively,intheFrontPageuserinterface(UI),youcannothavetheHTMLtaborthePreviewtabopeninPageview.
![Page 50: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/50.jpg)
Roleofaframeset
AframesetisthecontainerforalloftheframesinaWebwindow.Eachframeiscontainedinanindividualpagewindowandhasanindividualpageassociatedwithit.ByaccessingtheFrameWindowobjectfromtheWebobjectmodel,youaccessanFPHTMLWindow2objectthatcontainstheframepagedocument.Fromtheseobjectsyoucanaccessthewindows,documents,andframesoftheframeset.Inthefollowingstatement,myFramesetisanFPHTMLWindow2objectthatreturnstheframespagedocument.Fromthisobject,youcanaccessthe<FRAME>and<FRAMESET>tags,orthewindowordocumentobjects.
SetmyFrameset=ActivePageWindow.FrameWindow
ThisstatementreturnsanFPHTMLWindow2objectthroughthePageobjectmodel.TheDocumentpropertyofmyFramesetaccessesthePageobjectmodelforthepagethatisequivalenttoaccessingtheframespageHTMLtabinPageviewinFrontPage.
NoteTheFramesPageHTMLandNoFramestabsareonlyavailablewhenframesexistonthecurrentpage.
![Page 51: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/51.jpg)
AccessingHTMLtags
YoucanaccessthesameinformationthataframestagaccessesbydeclaringanobjectasanFPHTMLFrameElement.Someofthepropertiesandmethodsavailableforthisobjectincludeborder,borderColor,click,frameBorder,frameSpacing,innerHTML,innerText,insertAdjacentHTML,andinsertAdjacentText.
DimmyFramesElements()AsFPHTMLFrameElement
YoucanaccesstheinformationforaframesettagbydeclaringanFPHTMLFramesetSiteobject.
DimmyFramesetSiteAsFPHTMLFramesetSite
![Page 52: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/52.jpg)
Dynamicframesources
YoucandynamicallychangetheframesourceintheHTMLcodebyusingthefollowingstatements.ThiscodesetstheframesourcetoanewURL,Inventory_1stQuarter.htm.
DimmyDocAsObject
SetmyDoc=ActivePageWindow.FrameWindow.Document
myDoc.all.tags("frame").Item(0).src=_
"Inventory_1stQuarter.htm"
![Page 53: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/53.jpg)
Iteratingallframesinapagewindow
Toaccessthepropertiesoftheframesetelementsthatresideinaparticularframespage,youmustaccesstheFPHTMLDocumentobjectthroughtheDocumentproperty.ThefollowingexampleiteratesthroughtheframesetandframeelementsfortheactiveframesetinMicrosoftFrontPage.Theframesetarray(myFSElements)compriseseach<FRAMESET>tagontheframespage.Theframesarray(myFramesElements)compriseseach<FRAME>tagontheframespage.Theframewindowsarray(myFramesWindows)compriseseachFPHTMLWindow2objectthatpointstoeachframe.Youpopulateeachofthearraysbyiteratingthroughtheirrespectivetagsorobjects.Oncethearraysarepopulated,youchangetheframeSpacingpropertyintheframesetelementto"10",theborderColorpropertyto"red",andchangevariousotherpropertiesinthedocument.
PrivateSubAccessFramesPage()
DimmyFPWindowAsFPHTMLWindow2
DimmyFSElements()AsIHTMLFrameSetElement
DimmyFramesWindows()AsFPHTMLWindow2
DimmyFramesElements()AsFPHTMLFrameElement
DimmyStyleAsFPHTMLStyle
DimiAsInteger
SetmyFPWindow=ActivePageWindow.FrameWindow
ReDimmyFSElements(myFPWindow.Document.all.tags("FRAMESET").length)
ReDimmyFramesElements(myFPWindow.Document.all.tags("FRAME").length)
ReDimmyFramesWindows(myFPWindow.frames.length)
Fori=0ToUBound(myFSElements)
SetmyFSElements(i)=_
myFPWindow.Document.all.tags("FRAMESET").Item(i)
Nexti
i=0
Fori=0ToUBound(myFramesWindows)
SetmyFramesWindows(i)=myFPWindow.frames(i)
Nexti
i=0
Fori=0ToUBound(myFramesElements)
SetmyFramesElements(i)=_
myFPWindow.Document.all.tags("FRAME").Item(i)
Nexti
![Page 54: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/54.jpg)
myFSElements(0).frameSpacing="10"
myFramesElements(0).borderColor="red"
WithmyFramesWindows(2).Document
.bgColor="green"
.body.innerHTML="<pid=""cool"">AddedbyFPProgrammability"
SetmyStyle=.all.cool.style
myStyle.backgroundColor="white"
myStyle.display=False
myStyle.textDecorationUnderline=True
myStyle.Font="Tahoma,24"
myStyle.fontStyle="italic"
EndWith
EndSub
![Page 55: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/55.jpg)
ChangingMetatagcontenttoanothercharacterset
Youcanchangeallofthecontent-typeMETAtagstoadifferentcharacterset(CentralEuropean)asshowninthefollowingcodesample.ThecurrentcharactersetisshownintheLanguageSettingsdialogbox(availableforpageproperties).
NoteTheentirecontent-typeMETAtagcontainsastringsimilartothefollowing:
content="text/html;charset=windows-1252"
Thecharactersetis"windows-1252"andisthedefaultcharactersetforU.S.English.
Eachtimetheprogramiteratesthroughtheloop,youaccessthenextframeintheframeWindowobject,whichisthesameasaccessingeachHTMLframestaginsuccession.However,theFramescollectiondoesnotsupporttheFor...eachconstruct.YoucannotaccessHTTP-EQUIVtypeMETAtagsviatheirname;youmustinsteaduseanindexasshowninthefollowingexample.TheexpressionbeginningwithmyContentType.ContentsetsthecharactersettoCentralEuropean.
NoteFrontPageplacesthecontenttypein<META>tagzero(0).
PrivateSubChangeCharSet()
DimmyFramesAsIHTMLFramesCollection2
DimmyFrameAsFPHTMLWindow2
DimmyHTTPEquivAsString
DimmyContentTypeAsObject
DimmyCountAsInteger
SetmyFrames=ActivePageWindow.FrameWindow.frames
SetmyFrame=ActivePageWindow.FrameWindow.frames(0)
myHTTPEquiv=0
FormyCount=0TomyFrames.Length-1
SetmyFrame=myFrames(myCount)
SetmyContentType=_
myFrame.Document.all.tags("meta").Item(myHTTPEquiv)
myContentType.content=_
"text/html;charset=iso-8859-2"
![Page 56: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/56.jpg)
NextmyCount
EndSub
![Page 57: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/57.jpg)
AccessingtheObjectModelinFrontPagefromDesign-TimeControlsSomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
Adesign-timecontrol(DTC)isoneofaclassofMicrosoftActiveXcontrolsthatisexclusivelyusedatdesign-timeasanaidtoauthoringWebsitecontent.DTCsfunctionjustlikeembeddedwizards—theycanbeeditedtomodifytheoutputthattheDTCgeneratesontheWebpage.Oncethefileisclosed,theDTCbecomesinactive—thetextthattheDTCgeneratedhasbeenembeddedintothefile.
![Page 58: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/58.jpg)
Howaredesign-timecontrolsdifferentfromActiveXcontrols?
Design-timecontrolsdonotcontainabinaryrun-timecomponent,butdohaveaspecialinterfacethatprovidestheabilityforthedesign-timecontroltopersistandgeneratetext.Design-timecontrolsandActiveXcontrolscanco-existonthesamewebpage.FormoreinformationonDTCs,seethedocumentationontheMicrosoftworkshopWebsitefordesign-timecontrols.
Howdodesign-timecontrolsdifferfromVisualInterDev?
FrontPageandMicrosoftVisualInterDevarecompatibleinmostareas.Fordesign-timecontrols,FrontPageprovidesfullaccesstotheDocumentobjectmodelthat'savailableinMicrosoftInternetExplorer.TheWebobjectmodelisalsoavailablefordesign-timecontrolsandprovidesaricharrayofobjects,events,methods,andproperties.FrontPagealsoprovidessupportforremovingtags(ortext)thatisinsertedintoadocumentbydesign-timecontrols.
PropertiessupportedbyFrontPagethatarenotsupportedbyMicrosoftVisualInterDev:
Preview—returnsastringcontainingthecontrolspreviewtext.Tag—returnsthetagcontextforthepreviewstring.
Built-inoptionsinVisualInterDevthatFrontPagedoesn'tsupport:
QueryBuilderDataconnectionsVisualInterDevobjectmodelfor.asppages
HowtoaccesstheFrontPageobjectmodelfromadesign-timecontrol
Adesign-timecontrolisatypeofActiveXcontrol,andthusaccessesitshost'sobjectmodelsimilarlytoothercontrols(seeFPHTMLObjectElementobject).Thedesign-timecontrolhasaUserControlpropertythatreturnstheUserControlobject.ThisobjectinturnhasanExtenderpropertythatreturnstheenvironmentwheretheActiveXcontrolresides.Theexpression,UserControl.extenderreturnstheenvironmentforthespecifiedDTC.
![Page 59: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/59.jpg)
TheExtenderpropertyreturnsFPHTMLObjectElementobjectandprovidesaccesstoallofthepropertiesandmethodsintheFPHTMLObjectElementobject.OneofthesepropertiesistheDocumentpropertythataccessestheFrontPagePageobjectmodelforthedocumentwherethedesign-timecontrolresides.ThefollowingstatementsillustratehowtoaccesstheDocumentpropertyfromaDTC.
DimmyDTCAsFPHTMLObjectElement
DimmyDocAsFPHTMLDocument
DimmyPageWindowAsPageWindowEx
SetmyDTC=UserControl.Extender
SetmyDocument=myDTC.document
SetmyPageWindow=myDoc.parentWindow.external
ThelastSetstatementillustrateshowtoaccesstheWebobjectmodelfromthePageobjectmodel.
![Page 60: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/60.jpg)
CodinginaWindowlessEnvironmentInMicrosoftFrontPage,itispossibletocreateawindowlessenvironmenttocutdownonUserInterface(UI)overhead,buttherearesomedrawbackstoworkinginsuchanenvironment.Forexample,openingapagewiththeViewModepropertysettofpPageViewNoWindow,createsawindowlessenvironmentwherewindowelementsthatrequiretheUIwon'tworkcorrectly.IfyouopenapagewithoutawindowandtrytoaccessitusingcodesuchasPageWindow.Document.ParentWindow,theresultingcodereturnsnothinginsteadofreturninganFPHTMLWindow2object.Thefollowingstatementsprovideaccesstowindowlesspages.
Application.LocatePage(DocumentUrlAsString,_
ViewModeAsFpPageViewMode)AsPageWindowEx
Web.LocatePage(DocumentUrlAsString,ViewModeAsFPPageViewMode)_
AsPageWindowEx
File.Edit(ViewModeAsFpPageViewMode)AsPageWindowEx
ThefollowingtabledescribesthePageWindowExmethodsandpropertiesandtheobjectsorerrormessagestheyreturn.SomemethodsandpropertiesofthePageWindowExobjectaredisabledinawindowlessenvironmentandwillreturntheresultsshowninthefollowingtable.
DisabledMethodorPropertyofthePageWindowObject ReturnedObjectorErrorMessage
ActiveDocument Returns"objectorwithvariablenotset"errormessage.
ActiveFrameWindow Returns"objectorwithvariablenotset"errormessage.
Caption ReturnstheURLforthePageWindowobject.
Document ReturnsaDocumentobject.File ReturnsaFileobject.
ViewMode Thispropertycannotbeset.ItreturnstheconstantfpPageViewNoWindow.
Visible ReturnsFalse.
![Page 61: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/61.jpg)
Web
ReturnstheWebobjectiftheobjectwaslocatedusingthefollowingstatements.
Web.LocatePage
File.Edit
ApplyTheme Returnsarun-timeerror.Close(ForceSave) Closesthepagewindow.Refresh(ForceSave) Refreshesthepagewindow.Save(ForceOverwrite) Savesthepagewindow.SaveAs(ForceOverwrite) SavesthepagewindowtoanewURL.
![Page 62: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/62.jpg)
ShowAll
![Page 63: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/63.jpg)
ModifyingPagesProgrammaticallyThistopicillustrateshowtoworkwiththeFPHTMLDocumentobjectelementswithinthePageobjectmodeleithertochangethecontentsofapageorsimplytoaccessthecontentsofapageforverification.
MicrosoftVisualBasicisapowerfultoolthatyoucanusetomodifycontentinyourWebpages.AsyoubrowsethroughtheObjectBrowser,you'llseemanyofthesametypesofcomponentsthatyou'refamiliarwithinMicrosoftInternetExplorer.
Tip
ToonlyviewtheprogrammingelementsthatarecompatiblewiththeFrontPagePageobjectmodel,select"FrontPageEditor"astheobjectlibraryintheObjectBrowser.
YoucanaccesstheHTMLelementsofapageusingtheActiveDocumentorDocumentpropertiesthatreturnthedocumentobjectviathePageWindowExobject.Forexample,thefollowingstatementchangesthebackgroundcolorforthepageintheactivepagewindow.
ActivePageWindow.Document.bgColor="DarkBlue"
Thefollowingexamplechecksforaspecifichyperlink(index.htm)withintheactivedocument.Ifthehyperlinkisfound,theprocedureexits,butifthehyperlinkisn'tfound,theprocedurefirstchecksiftheactivedocumentisindex.htmand,ifnot,thehyperlinkisaddedattheendofthedocument.
PrivateSubVerifyIndexLink()
DimmyDocAsFPHTMLDocument
DimmyLinksAsVariant
DimmyLinkAsVariant
DimmyNumberOfLinksAsInteger
DimmyAddLinkAsBoolean
DimmyLinkNameAsString
DimmyLinkName2AsString
SetmyDoc=ActivePageWindow.Document
![Page 64: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/64.jpg)
SetmyLinks=myDoc.Links
myNumberOfLinks=myLinks.length
myLinkName="index.htm"
myLinkName2=""""&myLinkName&""""
ForEachmyLinkInmyLinks
IfmyLink=myLinkNameThen
myAddLink=True
ExitFor
EndIf
Next
IfmyAddLink=FalseAndmyDoc.nameProp<>"index"Then
CallmyDoc.body.insertAdjacentHTML("BeforeEnd","<ahref="_
&myLinkName2&">"&myLinkName&"</a>")
ActivePageWindow.Save
EndIf
EndSub
NoteNoticethatinthelastIfstatementtheactivepagewindowissavedbeforeexitingtheprocedure.ThiswouldbeagoodstatementtoaddtotheOnPageCloseevent.
![Page 65: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/65.jpg)
UnderstandingWebWindowsandPageWindowsInMicrosoftInternetExplorer,thewindowobjectistherootoftheobjecthierarchy.InMicrosoftFrontPage,theApplicationobjectistherootoftheobjecthierarchyandtheWebWindowExobjectisanobjectinthethirdtieroftheobjecthierarchybelongingtothecollectionofWebWindows(secondtier).TheDocumentpropertyisaccessedviathePageWindowExobject(belongingtothecollectionofPageWindows),whoseparentistheWebWindowExobject.TheobjecthierarchyfortheWebWindowscollectionisshowninthefollowingdiagram.
WebWindows WebWindowExPageWindowsPageWindowEx
WhatisaWebWindowExobject?
TheWebWindowExobjectisthewindowcontainerfortheWebsite.WhenyouopenaWebsiteinFrontPage,youseetheWebsiteinits"web"window.FrontPageopensanewwindowforeachWebsiteyouopen.
WhatisaPageWindowExobject?
ThePageWindowExobjectisthecontainerforthewebpage.Whenyouopenapageinawebwindow,thatpageiscontainedinapagewindow(visibleintherightpane).FrontPageopensanewpagewindowforeachpageyouopen;howevereachPageWindowExobjectiscontainedwithintheWebWindowExobjectfortheindividualWebsite.Eachpagethatyou'veopenedisvisibleontheWindowsmenuinFrontPage.
WheredoestheDispFPHTMLDocumentobjectfitin?
TheFPHTMLDocumentobjectcontainstheHTMLelementsforapage.Theelementsforthedocumentareavailableusinganexpressionsuchas
![Page 66: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/66.jpg)
ActivePageWindow.Document.elementwhereelementisoneoftheHTMLelementsavailableinFrontPage.NotethatnotallHTMLelementshavecorrespondingpropertiesthatyoucanusetoaccesstheelement.Forexample,thereisnoheadpropertytoaccesstheHEADelement.Inthesecases,useactivepagewindow.Document.all.tags.item("element")toreturntheobjectthatcorrespondstothespecifiedelement.
![Page 67: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/67.jpg)
ReturninganObjectfromaCollectionTheItempropertyreturnsasingleobjectfromacollection.ThefollowingstatementssetthefileOnevariabletoaWebFileobjectthatrepresentsthefirstfileintheFilescollection.
NoteAllcollectionsintheMicrosoftFrontPageWebandPageobjectmodelsarezero-based,soyouaccessthefirstiteminthecollectionbyusingazero.
DimfileOneAsWebFile
SetfileOne=ActiveWeb.RootFolder.Files.Item(0)
TheItempropertyisthedefaultpropertyformostcollections,soyoucanomittheItemkeywordasshowninthefollowingstatement.
SetfileOne=ActiveWeb.RootFolder.Files(0)
![Page 68: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/68.jpg)
Namedobjects
AlthoughyoucanusuallyspecifyanintegervaluewiththeItemproperty,itmaybemoreconvenienttoreturnanobjectbyname.ThefollowingexampleeditsafilenamedWebSales.htmintheactiveWebpage.
ActiveWeb.RootFolder.Files("WebSales.htm").Edit
![Page 69: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/69.jpg)
UsingEventstoControlActionsTherearetwotypesofeventsinMicrosoftFrontPage—eventsthatareraisefromtheApplicationandWebobjectmodelsandeventsthatareraisedfromthePageobjectmodel.
![Page 70: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/70.jpg)
Applicationevents
TheeventsfortheApplicationobjectmodelcanbeusedtocontrolunderwhatconditionsaWebsiteispublished,whetheryouwanttosaveapagewhenevertheOnPageCloseeventisfired,orwhetheryouwanttosetstyles,fonts,orbackgroundswheneveranewpageiscreated.
![Page 71: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/71.jpg)
Pageevents
IntheMicrosoftInternetExplorerDHTMLobjectmodel,eventhandlersarecreatedusingscriptsforuseatrun-time.
However,intheFrontPagePageobjectmodel,you'reprogrammingwitheventsandobjectsthatarecompatiblewithInternetExplorer,butforuseatdesigntime.Toprogrameventsforruntime,youcanusethestandardMicrosoftVisualBasic5.0(orhigher)keywordstoaccessthePageobjectmodeleventsjustasyouwouldtoaccesstheWebobjectmodelevents.Thismethodcombinesthetwotechniquesdescribedpreviously.ThefollowingexamplecatchestheonclickeventforahyperlinkinFrontPage.
IntheVisualBasicEditor,insertaclassmoduleandnameitCatchOnClick.Addthefollowingcodetotheclassmodule.
DimWithEventseAnchorAsFPHTMLAnchorElement
DimWithEventseDocAsFPHTMLDocument
DimeAsIHTMLEventObj
PrivateSubClass_Initialize()
SeteDoc=ActiveDocument
SeteAnchor=eDoc.links(0)
EndSub
PrivateFunctioneAnchor_onclick()AsBoolean
Sete=eAnchor.Document.parentWindow.event
If(MsgBox("OnClickEventfor"&e.srcElement.tagName&_
"wouldyouliketocanceltheeventbubbling?",_
vbYesNo)=vbYes)Then
e.cancelBubble=True
e.returnValue=False
Else
e.cancelBubble=False
e.returnValue=True
EndIf
EndFunction
PrivateFunctioneDoc_onclick()AsBoolean
MsgBox"OnClickeventfortheDocumentobject"
EndFunction
Nextaddastandardmoduleandaddthefollowingcode.
![Page 72: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/72.jpg)
PubliceAsCatchOnClick
SubGetClick()
Sete=NewCatchOnClick
EndSub
NoteToruntheexample,performthefollowingsteps:
AddahyperlinktoapageinFrontPage.RuntheGetClickproceduretocreateaglobalinstanceoftheCatchOnClickeventhandlerclass.Clickthehyperlink.
Apromptisdisplayedstatingthattheonclickeventfired.Thepromptalsoqueriestheusertofindoutwhethertheprogramshouldpasstheeventonuptheeventchain.IfYesischosen,theonclickeventispasseduptothedocumentobjecttobehandled.
Tocontrolwhichdocumentobjecttheeventispassedto,youmustsetboththecancelBubbleandreturnValueproperties.ThecancelBubbleeventworkstocanceltheeventfromgoinganyfartheruptheeventchain.SetthecancelBubblepropertyoftheIHTMLEventObjecttoTruewhenyoudon'twanttheonclickeventtobepasseduptothenextlevelofonclickevents,otherwise,setthecancelBubblepropertytoFalse.Forexample,ifyouhaveanimagethathasanonclickeventplacedonadocument,whichalsohasanonclickevent,youwouldsetthecancelBubblepropertyfortheIHTMLEventObjobjecttoTruefortheimage,ifyoudon'twanttheonclickeventtobepassedonuptothedocumentonclickevent.
ThereturnValuepropertyisusedtocontrolthedefaultactiontakenbyFrontPagewhenaneventfires.Usingthepreviousexampleofanimageplacedonadocument,ifthereturnValuepropertyfortheIHTMLEventObjectfortheimageissettoFalseintheonclickevent,thentheshortcutmenuwouldbedisabled(becausetheright-clickcontextmenuisthedefaultactionfortheonclickevent).
![Page 73: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/73.jpg)
![Page 74: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/74.jpg)
ManagingPublishingwithMetaTagsAutomatepublishingyourWebsitebyusingacombinationofeventssuchasOnBeforeWebPublishandmetadatathatcanbeobtainedbyaccessingthedatainthePropertiescollection.Forexample,beforepublishingaWebsite,youmightwanttocheckthemetadataforallofthepagesintheWebsite.TocheckifMicrosoftFrontPagegeneratedallofthepagesinyourWebsite,usethefollowingcodeintheOnBeforeWebPublishingevent,alongwithaneventhandler.
PrivateSubCheckIfFP()
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyMetaTagsAsMetaTags
DimmyMetaTagAsVariant
SetmyFiles=ActiveWeb.RootFolder.Files
ForEachmyFileInmyFiles
SetmyMetaTags=myFile.MetaTags
'Checkforanytextfiles.
IfmyMetaTags.Count=0And_
myFile.Extension<>".asa"Then
MsgBoxmyFile.Name&"wasnotgeneratedbyFrontPage."
EndIf
'Checkallwebpages.
ForEachmyMetaTagInmyMetaTags
IfmyMetaTag="generator"Then
IfmyFile.Properties("vti_generator")=_
"MicrosoftFrontPage4.0"Then
ExitFor
Else
MsgBoxmyFile.Name&"wasnotgeneratedbyFrontPage."
EndIf
EndIf
Next
Next
EndSub
Youcanalsocheckthevalueofthevti_donotpublishpropertykeybeforepublishing.Ifthedocumentisadraftoradocumentthatisn'ttobepublished,thevti_donotpublishpropertykeywillbesettoTrue.Thefollowingexamplechecksthevalueofthevti_donotpublishpropertykey.
![Page 75: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/75.jpg)
DimmyFilesAsWebFiles
DimmyFileAsWebFile
ForEachmyFileInmyFiles
IfmyFile.Properties("vti_donotpublish")=TrueThen
MsgBox"Donotpublish"&myFile.Name
EndIf
Next
Thevti_donotpublishpropertykeycanbeusedtodisablepublishing.Whenpublishingiscomplete,thefilewillnotbepublishedtotheserver.ThefollowingexampledisablespublishingforthefirstfileintheFilescollection.
SubPublishThisFile(myFileNameAsString,myStatusAsBoolean)
DimmyFileAsWebFile
SetmyFile=ActiveWeb.LocateFile(myFileName)
CallmyFile.Properties.Add("vti_donotpublish",Not(myStatus))
myFile.Properties.ApplyChanges
EndSub
PrivateSubPublishFile()
PublishThisFileActiveweb.RootFolder.Files(0),False
EndSub
![Page 76: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/76.jpg)
ProgrammingDynamicElementsinMicrosoftFrontPageTheobjects,methods,andpropertiesinMicrosoftInternetExplorerareusuallydesignedforrun-timeuse.InMicrosoftFrontPage,mostoftheelementsaredesignedfordesign-timeonly.Youcanprogrammaticallyaddcontenttoanexistingdocument,accessselectionsonapage,createascriptingelement,ormodifyanexistingtable.
AddingcontenttoadocumentusingaTextRange
AccessinguserselectionsusingaTextRange
Addingscripttoapage
Accessingtables
![Page 77: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/77.jpg)
AddingcontenttoadocumentusingaTextRange
YoucanprogrammaticallyaddHTMLcontenttoaWebpagebycreatingatextrangeandaddingthenewcontenttothepageasshowninthefollowingexample.ThetextrangeiscreatedfromtheBODYelementofthemyDocumentvariable.IfthevalueinthemyClearPageparameterisTrue,thentheentirecontentbetweentheopeningandclosingBODYelementisreplacedwiththenewHTMLcontent,otherwisethenewcontentisappendedtotheoriginalcontent.
PublicFunctionAddHTMLToPage(myDocumentAsObject,_
myHTMLTextAsString,myClearPageAsBoolean)AsBoolean
DimmyRangeAsIHTMLTxtRange
DimmyBodyTextAsFPHTMLBody
OnErrorGoToCannotAddHTML
'CreateaTextRangeobject
IfmyClearPageThen
SetmyRange=_
myDocument.all.tags("BODY").Item(0).createTextRange
'Clearthecurrentdocument
CallmyRange.pasteHTML("")
myRange.collapseFalse
SetmyRange=Nothing
EndIf
SetmyBodyText=myDocument.all.tags("BODY").Item(0)
myBodyText.innerHTML=myBodyText.innerHTML&myHTMLText&vbCrLf
AddHTMLToPage=True
ExitFunction
CannotAddHTML:
AddHTMLToPage=False
EndFunction
SubAddNewHTML()
DimmyHTMLStringAsString
DimmyBodyElementAsFPHTMLBody
myHTMLString="<B><I>NewSaleonVintageWines!</I></B>"&vbCr
IfAddHTMLToPage(ActivePageWindow.Document,myHTMLString,True)Then
SetmyBodyElement=_
![Page 78: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/78.jpg)
ActivePageWindow.Document.all.tags("BODY").Item(0)
EndIf
EndSub
![Page 79: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/79.jpg)
AccessinguserselectionsusingaTextRange
YoucanusetheIHTMLTxtRangeobjecttoselectHTMLobjectsormanipulateauserselectiononaspecifieddocument.Thefollowingexampleappliesabackgroundcolortothecurrentselection.
PrivateSubApplyStyleToSelection()
DimmyRangeAsIHTMLTxtRange
SetmyRange=ActiveDocument.selection.createRange
myRange.parentElement.style.backgroundColor="SkyBlue"
EndSub
![Page 80: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/80.jpg)
Addingscripttoapage
ScriptinginMicrosoftFrontPageVisualBasicforApplicationsiseasy.JustloadthescriptintoaStringvariableandinserttheStringtotheHEADelementforthepage.(TheHEADelementisaccessedusinganIHTMLElementobject.)OncetheStringhasbeenaddedtothepage,itisavalidscriptingelementandcanbeaccessedthroughtheFPHTMLScriptElementobjectandmodified.Thefollowingcodeaddsascriptelementtothecurrentpage,verifiesthatthescriptwasadded,addsaquerytotheuserwithOKandCancelbuttons,andthenprintssomeofthescriptelementpropertiesintheImmediatewindowoftheVisualBasicEditor.
PrivateSubCreateAScript()
DimmyScriptElementAsFPHTMLScriptElement
DimmyHTagAsIHTMLElement
DimmyBodyTagAsIHTMLElement
DimmyBodyStringAsString
DimmyHTMLStringAsString
DimmyTextAsString
'Buildascripttagconstruct.
myHTMLString=myHTMLString&"<scriptlanguage=""VBScript"">"_
&vbCrLf
myHTMLString=myHTMLString&"FunctiondoOK"&vbCrLf
myHTMLString=myHTMLString&_
"msgbox""Pleasewait,anorderformisbeinggenerated..."""&_
vbCrLf
myHTMLString=myHTMLString&"EndFunction"&vbCrLf&vbCrLf
myHTMLString=myHTMLString&"FunctiondoCancel"&vbCrLf
myHTMLString=myHTMLString&_
"msgbox""Exitingorderingprocess."""&vbCrLf
myHTMLString=myHTMLString&"EndFunction"&vbCrLf
myHTMLString=myHTMLString&"</script>"&vbCrLf
'Buildacalltagconstruct.
myBodyString="<CENTER>"&vbCrLf
myBodyString=myBodyString&_
"<BUTTONonclick=""doOK()"">OK</BUTTON>"&vbTab
myBodyString=myBodyString&_
"<BUTTONonclick=""doCancel()"">Cancel</BUTTON>"&vbCrLf
myBodyString=myBodyString&"</CENTER>"
'Addtexttothedocument
myText="I'dliketoordersomevintagewines."
![Page 81: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/81.jpg)
'AccesstheHEADelement.
SetmyHTag=ActivePageWindow.Document.all.tags("HEAD").Item(0)
'AppendthescriptelementtotheHEADelement(myHTag).
myHTag.innerHTML=myHTag.innerHTML&myHTMLString
'Verifythatthescriptelementwasadded.
IfActivePageWindow.Document.scripts.length=1Then
'Accessthescriptelementjustadded.
SetmyScriptElement=ActivePageWindow.Document.scripts(0)
'PrintscriptelementpropertiestotheImmediatewindow.
'JScriptonly:thenextstatementgetstheFOR=attributefrom
'theJScript,otherwiseanemptystringprintsintheImmediate
'window.
Debug.PrintmyScriptElement.htmlFor
'Retrievethecontentofthescript.
Debug.PrintmyScriptElement.outerHTML
'Checkscriptinglanguage.
Debug.PrintmyScriptElement.language
EndIf
'Addaquerytotheuserandcallthescriptelement.
ActiveDocument.body.insertAdjacentHTML"BeforeEnd",_
"<B><I>"&myText&"</B></I><P>"&myBodyString
EndSub
Accessingtables
AnyonewhohascreatedtablesandworkedwiththeircontentsinHTMLwillfinditeasytouseMicrosoftVisualBasictoaccesstables.Thefollowingprogramaccessesatableonthecurrentpageandinsertsacell.
SubAccessTables()
DimmyTableAsFPHTMLTable
DimmyRowAsFPHTMLTableRow
DimmyCellAsFPHTMLTableCell
'Getthetable.
SetmyTable=ActiveDocument.all.tags("TABLE").Item(0)
'Getthefirstrow.
SetmyRow=myTable.rows(0)
MsgBoxmyRow.cells.Length
![Page 82: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/82.jpg)
'Getthefirstcell.
SetmyCell=myRow.cells(0)
MsgBoxmyCell.Width
'Addanewcelltothefirstrow.
SetmyCell=myTable.rows(0).insertCell(myRow.cells.Length)
EndSub
![Page 83: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/83.jpg)
ManagingSourceControlProjectsinMicrosoftFrontPageMicrosoftFrontPageprovidestwomethodsofversioning,FrontPageLightWeightsourcecontrol(alsoknownasMicrosoftOffice-stylelockingorFrontPage-basedlocking)andMicrosoftVisualSourceSafe.FrontPageLightWeightsourcecontrolisthedefaultversioningmethodforsourcecontrolprojectsinFrontPage.
VersioningprovidesameasureofcontroloveruserswhomaintainpagesonyourWebsites.Bothsourcecontrolmethodsprovidecheckin,checkout,undocheckout.VisualSourceSafeprovidesotherversioningcapabilities,suchasversiontrackingandrollbackfeatures.
![Page 84: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/84.jpg)
Creatingasourcecontrolproject
Tocreateanewsourcecontrolproject,yousettheRevisionControlProjectpropertytothepathoftheproject(forVisualSourceSafe)orto<FrontPage-basedLocking>asshowninthefollowingstatement.
ActiveWeb.RevisionControlProject="<FrontPage-basedLocking>"
AssumingthattheString"$/CohoWinery"isavalidVisualSourceSafeproject,thefollowingstatementassignstheactiveWebsitetoaVisualSourceSafeproject.
ActiveWeb.RevisionControlProject="$/CohoWinery/Inventory"
Thefollowingexamplecreatesasourcecontrolprojectandchecksouttwofiles.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\CohoWinery".Youmaycreatetwofilescalled"index.htm"and"footnote.htm"orsubstitutefilenamesofyourchoice.
PrivateSubCreateSourceControl()
DimmyWebAsWebEx
DimmyProjectAsString
DimmyFile1AsWebFile
DimmyFile2AsWebFile
SetmyWeb=Webs.Open("C:\MyDocuments\MyWebSites\CohoWinery")
SetmyFile1=myWeb.RootFolder.Files("index.htm")
SetmyFile2=myWeb.RootFolder.Files("footnote.htm")
myProject="<FrontPage-basedLocking>"
myWeb.RevisionControlProject=myProject
myFile1.Checkout
myFile2.Checkout
EndSub
TheCheckoutmethodprovidesaBooleanforcecheckoutargumentforadministrators.
![Page 85: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/85.jpg)
Removingasourcecontrolproject
Onceaprojectiscompleted,youmaydecidetoremoveversioning.Todothis,settheRevisionControlProjectpropertytoanemptyString("")asshowninthefollowingstatement.
myWeb.RevisionControlProject=""
![Page 86: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/86.jpg)
SwitchingbetweenFrontPageLightWeightandVisualSourceSafeprojects
Toswitchbetweenthesetwotypesofversioning,youmustfirstsettheRevisionControlProjectpropertytoanemptyString("")asshowninthefollowingstatement.
myWeb.RevisionControlProject=""
![Page 87: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/87.jpg)
ListsCollectionMultipleobjects Lists
ListMultipleobjects
RepresentsthecollectionofallListobjectsinthecurrentWebsite.ListsallowinformationtobesharedandexchangedbetweendifferentusersanddifferentWebsites.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 88: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/88.jpg)
UsingtheListscollection
UsetheListspropertyoftheWebExobjecttoreturnthecollectionofalllistsintheWebsite.UseLists.item(index),whereindexiseitherthenameofthelistoritsnumericpositionwithinthecollection,toreturnasingleListobject.
ThefollowingexampledisplaysthenamesofalllistsintheactiveWebsite.IftheactiveWebsitedoesnotcontainanylists,amessageisdisplayedtotheuser.
SubListAllLists()
'Displaysthenamesofalllistsinthecollection
DimlstWebListAsList
DimstrNameAsString
'Checkifanylistsexist
IfNotActiveWeb.ListsIsNothingThen
'Cyclethroughlists
ForEachlstWebListInActiveWeb.Lists
'addlistnamestostring
IfstrName=""Then
strName=lstWebList.Name&vbCr
Else
strName=strName&lstWebList.Name&vbCr
EndIf
Next
'Displaynamesofalllists
MsgBox"ThenamesofalllistsinthecurrentWebsiteare:"_
&vbCr&strName
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
UsetheLists.AddmethodtoaddanewlisttotheListscollection.ThefollowingexampleaddsanewlistoftypefpBasicListcalledNewSharetotheactiveWebsite.
SubNewList()
'AddsanewlisttothecurrentWebsite
![Page 89: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/89.jpg)
DimobjAppAsFrontPage.Application
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewlist
objLists.AddName:="NewShare",_
ListType:=fpListTypeBasicList,_
Description:="ListofSharedfiles"
'Displaymessagetouser
MsgBox"AnewlistwasaddedtotheListscollection."
EndSub
![Page 90: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/90.jpg)
MetaTagsCollectionWebFile MetaTags
Anarrayofpropertykey/valuepairs.EachitemintheMetaTagscollectionrepresentsaMETAtagcontainedonanHTMLpageinMicrosoftFrontPage.ThereisnoMetaTagobject.
NoteMETAtagsgeneratedbyFrontPage,suchasMETAtagsforathemeorborder,won'tshowupintheMetaTagscollection.TheMetaTagscollectionisonlypropagatedafterthefileissaved.Forexample,ifyouaddanewMETAtagtoapagebyusingtheCodevieworbyprogrammaticallyusingthePageobjectmodelinMicrosoftVisualBasicforApplications,youwon'tbeabletoviewthepropertykey/valuepairsuntilafteryousavethepage.TosavespaceintheMETAdictionary,youcanusethefollowingmethodstodisabletheMETAtagstore:
SettheDisableMetaTagStorekeyonaper-servicebasisSettheDisableMetaTagStorekeyasaglobalsettingunderHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SharedTools\WebServerExtensions\AllPortsSetthevti_disablemetatagstoreproperty
TheDisableMetaTagStorekeyfunctionsinthesamewayasotherserversettings;seetheServerExtensionsResourceKitformoreinformationaboutserversettings.
![Page 91: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/91.jpg)
UsingtheMetaTagsCollection
UsetheMetaTagspropertytoreturntheMetaTagscollection.
NoteInthemetadataforFrontPage,thehttp-equivattributecanbeusedinplaceofthenameattribute.FrontPagedoesn'tusethevalueofthehttp-equivattributeinresponsemessageheaders.ThesyntaxforMETAdataisasfollows:
<META
CONTENT=description
HTTP-EQUIV=text
NAME=text
TITLE=text
URL=url
>
YoucanalsoreturnalistoftheMETAtagsthatexistintheactiveWebsitebyaccessingthefilestructurethroughtherootfolderoftheActiveWebobject,asshowninthefollowingexample.
NoteTorunthisexample,createaformwithatextboxcalledtxtMetaTags(settomultiplelines)andacommandbuttoncalledcmdGetMetaTagInfo,andthencopytheexampleintothecodewindow.
PrivateSubcmdGetMetaTagInfo_Click()
DimmyWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyMetaTagsAsMetaTags
DimmyMetaTagAsVariant
DimmyFileNameAsString
DimmyMetaTagNameAsString
DimmyReturnInfoAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
SetmyMetaTags=myFile.MetaTags
ForEachmyMetaTagInmyMetaTags
myFileName=myFile.Name
myMetaTagName=myMetaTag
![Page 92: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/92.jpg)
myReturnInfo=myFileName&":"&myMetaTagName
txtMetaTags.Text=txtMetaTags.Text&myReturnInfo
Next
Next
txtMetaTags.SetFocus
txtMetaTags.CurLine=0
EndWith
EndSub
UsetheApplicationpropertytoreturntheApplicationobject.ThefollowingstatementreturnstheApplicationobject.
myApplication=ActiveWeb.RootFolder.Files(0).MetaTags._
Application
UsetheCountpropertytoreturnthenumberofMETAelementsinthecollection.ThefollowingstatementreturnsthenumberofMETAelementsinthetenthfileoftheActiveWebobject.
myMetaTagCount=ActiveWeb.RootFolder.Files(9).MetaTags.Count
UseItems(index),whereindexisthepropertykeyvalueasastring,ofanitemintheMetaTagscollectiontoreturnthepropertykey/valuepair.ThefollowingexamplereturnstheprogramidentificationtagfromtheMETAtagsinthefirstfileoftheActiveWebobject.
myMetaTagOne=ActiveWeb.RootFolder.Files(0).MetaTags("ProgId")
Commonpropertykeyvaluesare"generator"and"progid."Formoreinformationaboutpropertykeyvalues,seethetableinthePropertiesobject.
UsetheParentpropertywhenyouwanttoreturnthefilecontainerfortheMetaTagscollection.Forexample,thefollowingexamplereturnstheUrlpropertyoftheWebFilecontainerobjectthatisassociatedwiththeMETAtagsforthefirstfileoftheActiveWebobject.
myMetaTagParent=_
ActiveWeb.RootFolder.Files(0).MetaTags.Parent.Url
![Page 93: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/93.jpg)
![Page 94: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/94.jpg)
NavigationNodesCollectionMultipleobjects NavigationNodes
NavigationNodeMultipleobjects
AcollectionofNavigationNodeobjectswithinthenavigationalstructureofaMicrosoftFrontPage-basedWebsite.EachNavigationNodeobjectrepresentsapointertoapageonaWebsite.TheNavigationNodeobjectisamemberoftheNavigationNodescollection.
![Page 95: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/95.jpg)
UsingtheNavigationNodesobject
UsetheNavigationNodepropertytoreturntheNavigationNodeobjectforaWebFileobject.FormoreinformationonreturningthecollectionofchildnodeswithinthenavigationalstructureofaWebsite,seetheChildrenproperty.ThefollowingexamplebuildsalistofthelabelsthatareassociatedwitheachNavigationNodeobjectintheNavigationNodescollection.Theprocedureexitswhenitreachestheendofthenavigationalstructure.
PrivateSubGetNavigationNode()
DimmyWebAsWebEx
DimmyWebFilesAsWebFiles
DimmyWebFileAsWebFile
DimmyNavNodeLabelAsString
DimmyLabelAsString
OnErrorResumeNext
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyFiles
ForEachmyFileInmyFiles
myLabel=myFile.NavigationNode.Label
IfErr<>0ThenExitSub
myNavNodeLabel=myNavNodeLabel&myLabel&vbCRLF
Next
EndWith
EndSub
UseChildren(index),whereindexistheindexnumberofaniteminthecollectionofchildnodes,toreturnasingleNavigationNodeobject.ThefollowingexamplereturnsthefirstNavigationNodeobjectinthecollection—whichisthehomepage.
SetmyNavNodeOne=ActiveWeb.RootNavigationNode.Children(0)
UsetheAddmethodtoaddaNavigationNodeobjecttotheNavigationNodescollection.Thefollowingexampleaddsanodetotherightmostpositioninthecurrentnavigationalstructure.
![Page 96: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/96.jpg)
PrivateSubAddNewNavNode()
DimmyWebAsWebEx
DimmyNewNavNodeAsNavigationNode
DimmyNavChildrenAsNavigationNodes
SetmyWeb=ActiveWeb
SetmyNavChildren=_
myWeb.rootfolder.Files(1).NavigationNode.Children
myNewNavNode=_
myNavChildren.Add("C:\MyWebs\Sale.htm","Sale",fpStructRightmostChild)
myWeb.ApplyNavigationStructure
EndSub
NoteAfteryoufinishmodifyingyournavigationalstructure,youmustapplythechangesusingtheApplyNavigationStructuremethodbeforethenavigationalstructureisupdatedinFrontPage.
![Page 97: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/97.jpg)
PageWindowsCollectionMultipleobjects PageWindows
PageWindowMultipleobjects
AcollectionofPageWindowExobjects.EachPageWindowExobjectrepresentsanopenWebpageinaMicrosoftFrontPageapplicationwindow.ThePageWindowExobjectisamemberofthePageWindowscollection.
![Page 98: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/98.jpg)
UsingthePageWindowsobject
UsethePageWindowspropertytoreturnthePageWindowscollection.ThefollowingstatementreturnsthePageWindowsobjecttothemyPagesvariable.
myPages=WebWindows(0).PageWindows
UsePageWindows(index),whereindexistheindexnumberofaniteminthePageWindowscollection,toreturnasinglePageWindowExobject.ThefollowingstatementreturnsthefirstPageWindowExobjectinthecollection.
SetmyPageWindow=WebWindows(0).PageWindows(0)
UsetheAddmethodtoaddapagewindowtothePageWindowscollection.ThefollowingexampleopensthespecifiedpageinmyWebOneandaddsthepagetothePageWindowscollection.
DimmyPageWindowsAsPageWindows
SetmyPageWindows=ActiveWeb.WebWindows(0).PageWindows
myPageWindows.Add("C:\MyWebSites\myWebOne\bugrep.htm")
UsetheApplicationpropertytoreturntheApplicationobjectfromthePageWindowscollection.ThefollowingexamplereturnstheApplicationobjectfromthePageWindowscollection.
myAppName=WebWindows.PageWindows.Application.Name
UsetheClosemethodtocloseaPageWindowExobjectorthecollectionofopenPageWindows.ThefollowingstatementclosesthefourthPageWindowExobjectforthefirstWebWindowExobject.
WebWindows(0).PageWindows(3).Close
UseClose(index),whereindexistheindexnumberofaniteminthePageWindowscollection,tocloseasinglePageWindowExobjectasshowninthefollowingstatements.Bothstatementsclosethesamepagewindow.Inthefirststatement,youclosethepagewindowusingtheindexnumberfortheClosemethod,whileinthesecondstatement,youclosethepagewindowbyspecifyingtheindexnumberforthepageyouwanttoclose.
![Page 99: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/99.jpg)
WebWindows(0).PageWindows.Close(2)
WebWindows(0).PageWindows(2).Close
UseClose()toclosealloftheopenPageWindowExobjectsinthePageWindowscollection.ThefollowingstatementclosesalloftheopenpagesinthePageWindowscollection.
WebWindows(0).PageWindows.Close()
UsetheCountpropertytoreturnthetotalnumberofpagewindowsinthePageWindowscollection.ThefollowingexamplereturnsthenumberofpagewindowsinthecollectionofPageWindows.
myPageCount=WebWindows(0).PageWindows.Count
UsetheParentpropertywhenyouwanttoreturnthecontainerforthePageWindowscollection.ThefollowingstatementreturnstheWebWindowExcontainerobjectforthefirstPageWindowExobjectusingtheParentproperty.
SetmyParent=ActiveWeb.WebWindows(0).PageWindows.Parent
![Page 100: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/100.jpg)
PropertiesCollection
Multipleobjects Properties
AcollectionofmetadataasPropertyobjects.EachiteminthePropertiescollectionrepresentsanitemassociatedwithanindividualWebEx,WebFile,orWebFolderobject.Formoreinformation,seethetableofPropertyKeysinUsingthePropertyKeys.Chooseatopicfromthefollowinglisttogodirectlytothattopic.
UsingthePropertiesobject
UsingthePropertiescollectionwithinaWebsite
Usingthepropertykeys
![Page 101: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/101.jpg)
UsingthePropertiesobject
UsetheAddmethodtoaddapropertytothePropertiescollection.ThefollowingstatementaddsacopyrightstatementtothePropertiescollection.
ActiveWeb.Properties.Add"Copyright",_
"Copyright1999byCohoWinery")
Youcanalsoaddandremovecategoriesandapprovallevels.
UsetheApplyChangesmethodtoapplyaPropertyobjectthathasbeenaddedtothecollectionofProperties.ThefollowingstatementsaddandapplyacopyrightpropertytothePropertiescollection.
ActiveWeb.Properties.Add"Copyright",_
"Copyright1999byCohoWinery")
ActiveWeb.Properties.ApplyChanges
UsetheCountpropertytoreturnthetotalnumberofpropertiesinthePropertiescollection.ThefollowingexamplechecksthatthenumberofpropertiesinthePropertiescollectionhasincreasedsincetheCopyrightpropertywasaddedandappliedtothecollection,andthengoesontoaddthecopyrighttoaWebsitepage.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\CohoWinery",oryoumaysubstituteanalternativeWebsiteURL.
PrivateSubcopyrightAdd()
DimmyWebAsWebEx
DimmyCopyrightAsString
DimmyCountAsInteger
DimmyMessageAsString
myCopyright="Copyright1999byCohoWinery"
myCount=ActiveWeb.Properties.Count
myMessage="Nonewpropertieshavebeenadded."
SetmyWeb=Webs.Open("C:\MyWebSites\CohoWinery")
myWeb.Activate
ActiveWeb.Properties.Add"Copyright",myCopyright
![Page 102: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/102.jpg)
IfmyCount<>ActiveWeb.Properties.Count–1Then
MsgBoxmyMessage
ExitSub
EndIf
ActiveWeb.RootFolder.Files("Zinfandel.htm").Open
ActiveDocument.body.insertAdjacentText"BeforeEnd",_
ActiveWeb.Properties("Copyright")
ActivePageWindow.Save
ActiveWeb.Close
EndSub
UsetheDeletemethodtodeleteasingleproperty.ThefollowingstatementdeletestheCopyrightpropertyfromthePropertiescollection.
ActiveWeb.Properties.Delete("Copyright")
UsetheParentpropertywhenyouwanttoreturnthecontainerforthePropertiescollection.Forexample,thefollowingstatementreturnstheURLoftheparentWebsite.
myParentURL=ActiveWeb.Properties.Parent.Url
![Page 103: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/103.jpg)
UsingthePropertiescollectionwithinaWebsite
UseProperties(index),whereindexisthePropertyKeyoftheiteminthePropertiescollection,toreturnasingleproperty.ThefollowingexamplereturnsthevalueofthePropertyKeyvti_hassearchbot.
PrivateSubCheckForSearchBot()
DimmyPropertiesAsProperties
DimmyFoundSearchBotAsBoolean
SetmyProperties=ActiveWeb.Properties
WithmyProperties
myFoundSearchBot=.Item("vti_hassearchbot")
EndWith
EndSub
ImportantThevaluesforpropertiesarevariant—thatis,eachvaluecanbeastring,aBoolean,oranarray.YoucanusetheTypename()functiontodeterminethetypeofthepropertyvalue.
NoteTorunthefollowingexampleyoumustcreateaformthatcontainsatextboxcalledtxtCategories.Also,noticethatmyCategoriesisdeclaredasavarianttypeinthisexample.Inapreviousexample,myFoundSearchBotwasdeclaredBoolean—butcouldalsohavebeendeclaredasastring.
PrivateSubGetWebPropertyCategories()
DimmyPropertiesAsProperties
DimmyCategoriesAsVariant
DimmyCategoryAsVariant
DimtxtCategoriesAsString
SetmyProperties=ActiveWeb.Properties
WithmyProperties
myCategories=.Item("vti_categories")
ForEachmyCategoryInmyCategories
txtCategories=txtCategories&"|"&myCategory
Next
EndWith
EndSub
![Page 104: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/104.jpg)
Usingthepropertykeys
ThepropertykeyscanbeavaluabletoolfororganizinginformationaboutyourWebsites.Forexample,youcanaddcategoriestothemasterlistofcategoriesonyourWebsite.
ImportantThecategorynamescanbeaddedtothecategorieslistusingcasesensitivity,butwillnotdisplaywithcasesensitivityintheUserInterface(UI).Becauseofthis,asituationmayoccurwhereausercreatesacategoryontheclient,suchas"WebAdministrators",andaduplicatecategoryexistsontheserver,suchas"webadministrators".Inthiscase,intheUI,MicrosoftFrontPagewillassignbothcategoriestothe"webadministrators"categoryandneitherofthesecanbedeletedfromtheWebsite(intheUI).Programmatically,thecasesensitivitywillcorrectlydisplayintheImmediateandLocalwindowsoftheVisualBasicEditor.
ThefollowingexamplefirstaddsacategorytothepropertiesfortheactiveWebsite,deletestheWaitingcategoryfromthesamelist(vti_categories),andthenaddsthenewcategorytoeachofthefilesintheactiveWebsite.
NoteWhencreatinganewcategory,youmustfirstaddthenewcategorytotheWebsitebeforeyouaddittoanyofthefiles.Theprocedure,AddCategories,addsanewcategorytotheWebsiteandthenextprocedure,AddCategoryToFiles,addsthesamecategorytoallofthefilesintheWebsite.
PrivateSubAddCategories()
DimmyWebAsWebEx
DimmyCategory(2)AsString
DimmyItemAsVariant
SetmyWeb=ActiveWeb
myCategory(0)="+webadministrators"
myCategory(1)="-waiting"
ActiveWeb.Properties("vti_categories")=myCategory
ActiveWeb.Properties.ApplyChanges
'Listalloftheitemsinvti_categoriesintheImmediatewindow
ForEachmyItemInmyWeb.Properties("vti_categories")
Debug.PrintmyItem
Next
EndSub
![Page 105: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/105.jpg)
PrivateSubAddCategoryToFiles()
DimmyWebAsWebEx
DimmyCategories(1)AsString
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyItemAsVariant
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
myCategories(0)="+webadministrators"
ForEachmyFileInmyFiles
myFile.Properties("vti_categories")=myCategories
myFile.Properties.ApplyChanges
'Listalltheitemsinvti_categoriesintheImmediatewindow
ForEachmyItemInmyFile.Properties("vti_categories")
Debug.PrintmyItem
Next
Next
EndSub
NoteAlthoughyoucancreatenewcategories,suchas"webadministrators",thataren'tincludedinthecategoriesthatareautomaticallyinstalledwithFrontPage,thesenewcategorieswon'tbevisibleintheUserInterface(UI)untiltheyareaddedtotheWebsite.Noticethatinthepreviousexample,thenewcategorywasaddedtotheWebsitefirstandwillbevisibleintheUI.
ThefollowingtableprovidesdetailedinformationaboutthepropertykeysavailableinFrontPage.NoticethatallpropertykeysinFrontPagestartwith“vti_”.Itissuggestedthatyouprefixthepropertykeysyouwanttoaddwithashortname,suchasanabbreviationforthenameofyourcompany,toreducethechancesofnamingconflictswithotherproperties.
PropertyKey Description Permission
vti_approvallevel
Theapprovallevelsetforapage.TheavailablelevelsareAssignedTo,ReviewStatus,andCategories.
Read/write
ListofavailableapprovallevelsthatcanbeappliedtodocumentsinaWebsite.Thispropertykeyisastringvector(oranarrayof
![Page 106: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/106.jpg)
vti_approvallevelsstrings).UsedtopopulatetheWeb-widelistofknown"reviewstatuses"(alsoknownas"approvallevels")thataresetforadocument.TheapprovallevelsyoucansetareAssignedTo,ReviewStatus,andCategories.
Read-only
vti_approvedby Theauthenticatednameofthepersonwhoapprovedthepage. Read-only
vti_assignedbyTheauthenticatednameofthepersonwhoassignedthepagetoauser.
Read-only
vti_assigneddate Thisisthedatethatthepagewaslastassignedtoauser. Read-only
vti_assignedtoTheauthenticatednameofthepersontowhomthepageisassigned.
Read-only
vti_author
Returnstheauthor'snameinstringformat.Theidentificationoftheauthenticatedauthorwhohas,oris,makingchangestothedocument.
NoteThisisdifferentfromtheAuthorpropertystoredaspartofMicrosoftOfficedocumentproperties,whichcanbesetbytheusertoanyarbitraryvalue.
Read-only
vti_casesensitiveurls
TrueiftheWebsiteisrunningonaserverwhereURLsarecasesensitive,suchasaserverrunningUNIX.Forexample,ifthispropertyissettoTrue,thenafilenamedMyFile.htmandafilenamedmyFile.htmaretreatedastwoseparatefiles.
Read-only
Themasterlistofcategories.Thispropertykeyisastringvector(or
![Page 107: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/107.jpg)
vti_categories
anarrayofstrings)thatisusedforbothWeb-levelanddocument-levelmetadata.AttheWeb-sitelevel,thepropertykeycontainsalistofallknowncategoriesthatexistintheWebsite.Atthedocumentlevel,itcontainsalistofallthecategoriestowhichthespecifieddocumentbelongs.
NoteThesecategoriesareautomaticallyupdatedwheneveracategoryisaddedormodifiedinanyway.
Read/write
vti_clientvercutoff
Youcanusethispropertykeytosetaversioncutoffstring.Thisismostcommonlyusedinamulti-versionenvironmenttopreventolderversionsoftheapplicationfromrunningonaspecificserver.Formoreinformation,seetheFrontPageServerExtensionsResourceKit.
Read/write
vti_dataconns ListofdataconnectionsusedbydatabasefeaturesinFrontPage. Read-only
vti_defaultcharset ThedefaultcharactersetfortheWebsiteorpage. Read-only
vti_defaultlanguage ThedefaultlanguagefortheWebsiteorpage. Read-only
vti_description Providesamulti-linetextboxfortheusertowritecommentsin. Read/write
vti_donotpublish SettoTrueifthepageismarkedas"draft"or"nottobepublished." Read/write
vti_filesize Thesizeofthefileinbytes. Read-onlyThispropertykeycorrespondstothegeneratortagwithinanHTML
![Page 108: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/108.jpg)
vti_generator
document.Thevalueofthevti_generatorpropertykeycontainsthenameoftheapplicationthat"generated"thedocument,whichmaybedifferentfromtheapplicationthatwasinvokedtohandlethepage.Forexample,ifyoucreatedoreditedapagewithMicrosoftWord,andthenretrievedthevalueofthevti_generatorpropertykeyinMicrosoftFrontPageVisualBasicforApplicationsforthatdocument,thevalueofthevti_generatorpropertykeywouldbeMicrosoftWord--eventhoughtheprocedurecallwasgeneratedbyFrontPage.Validvaluesare"MicrosoftWord","MicrosoftAccess","MicrosoftFrontPage",andsoon.
NoteFrontPagedeferstoWordwhenthere'sathemeconflictifthevti_generatorpropertykeycontains"MicrosoftWord".
Read-only
vti_globalpage
Marksapageasglobal,thatis,atop-levelpageinthenavigationstructure,onthesamelevelas,butnotequalto,thehomepage.
Read/write
vti_hasframeset
Trueifthepagecontainsframesets.Thispropertykeyisusedwhenconstructinglinkbarlinks.Whenthepagethatisbeinglinkedisaframeset,thelink'stargetattributeisforcedto"_top".Thiscausesthenewpagetoreplacethecurrentframesettopreventrecursive
Read-only
![Page 109: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/109.jpg)
framesetsatbrowsetime.
vti_hasruntimebots Trueifthepagehasrun-timebotsonit. Read-only
vti_htmlextensionsAconcatenatedstringofextensionsusedtospecifyaWebfile,suchashtm.html.asp.
Read-only
vti_httpdversion TheversionofFrontPagethatisrunningonthehttpdserver. Read-only
vti_imagemapformat
ThispropertykeysetstheURLformatusedbytheserver-sideimagemapprocessor.ValidvaluesareNCSAandCERN.ThispropertykeyisonlyusefulforpriorversionsofFrontPage.FrontPagenowusesclient-sideimagemaps.
Read/write
vti_imagemapurlprefix
Setstheserver-relativeURLoftheserver-sideimage-mapprocessorfortheselectedimage-mapformat.Ifthevalueofthevti_imagemapurlprefixpropertykeyissettoanemptystring(""),server-sideimagemapsarehandledautomaticallybytheFrontPageServerExtensions.Forotherformats,providethenameandlocationoftheimage-mapprocessor.Tospecifyclient-sideimagemaps,setthisvariabletoanemptystring.Formoredetailedinformation,seetheFrontPageServerExtensionsResourceKit.
Read/write
vti_insecureserverurl
Retrievesthehttp://URL(unsecuredURL)foraWebsite.Providescompatibilitywitholderbrowsersthatmaynothavesecurebrowsingcapability.Formoreinformation,seetheFrontPage
Read-only
![Page 110: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/110.jpg)
ServerExtensionsResourceKit.
vti_isbrowsable
Trueifthepagefolderisbrowsable.UseFolder.IsBrowsabletosetthisvalue..
Read-only
vti_ischildweb
Trueifthespecifiedfolderistherootofasubsite.UseFolder.MakeWebandFolder.RemoveWebtomodify.
Read-only
vti_isexecutable
SetthispropertytoTruetoenableifthisfolderismarkedforexecutablecontentontheserver.UseFolder.IsExecutabletosetthisvalue.
Read/write
vti_isscriptable
SetthispropertytoTrueifscriptingisenabledforthisfolder.UseFolder.IsScriptabletosetthisvalue.
Read-write
vti_longfilenames
Trueiftheserversupportsfilenamesthatarelongerthanthestandard8.3fileformat.(The8.3fileformatonlysupportsfilenameswitheightcharactersandextensionswiththreecharacters,suchas"filename.txt".)
Read-only
vti_metatags
ThispropertykeycorrespondstothecontentswithintheMETAtagsinanHTMLdocument.AlloftheinformationcontainedinthispropertykeyisaddedtotheMETAtagscollection.
Read-only
vti_modifiedby Authenticatednameoftheauthorwholastmodifiedthepage. Read-only
vti_navbuttonhomelabel
Theimagefileassociatedwiththebuttonthatlinkstothehomepage.
NoteThisimageisretrievedfrom Read/write
![Page 111: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/111.jpg)
thethemeassociatedwiththefileandisnotcustomizable.
vti_navbuttonhomelabeltext
Thetextthatoverlaysthevti_navbuttonhomelabel.
NoteThistextiscustomizablebytheuser.
Read/write
vti_navbuttonlabeltext
Thetextthatoverlaysthevti_nvabuttonuplabel.
NoteThistextiscustomizablebytheuser.
Read/write
vti_navbuttonnextlabel
Theimagefileassociatedwiththebuttonthatlinkstothenextpageinthenavigationstructure.
NoteThisimageisretrievedfromthethemeassociatedwiththefileandisnotcustomizable.
Read/write
vti_navbuttonnextlabeltext
Thetextthatoverlaysthevti_navbuttonnextlabel.
NoteThistextiscustomizablebytheuser.
Read/write
vti_navbuttonprevlabel
Theimagefileassociatedwiththebuttonthatlinkstothepreviouspageinthenavigationstructure.
NoteThisimageisretrievedfromthethemeassociatedwiththefileandisnotcustomizable.
Read/write
Thetextthatoverlaysthevti_navbuttonprevlabel.
![Page 112: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/112.jpg)
vti_navbuttonprevlabeltext NoteThistextiscustomizablebytheuser.
Read/write
vti_navbuttonuplabel
Theimagefileassociatedwiththebuttonthatlinkstothepageonelevelupinthenavigationstructure.
NoteThisimageisretrievedfromthethemeassociatedwiththefileandisnotcustomizable.
Read/write
vti_noclientimagemaps Trueifclientimagemapsareprohibited. Read-only
vti_nonnavpageTrueifthepageisn'tassociatedwithanavigationnodewithinthenavigationstructure.
Read/write
vti_nosourcecontrol
TrueiftheWebsiteisnotbeingstoredundersourcecontrol.PreventsaddingafiletosourcecontrolifthispropertyissettoTrue.
NoteIfafilehaspreviouslybeenaddedtoasourcecontrolprojectwiththevti_nosourcecontrolpropertysettoFalse,andthepropertyissubsequentlysettoTrue,thefilewillnotberemovedfromthesourcecontrolproject.
Read/write
Thispropertykeycorrespondstothe"originator"METAtaginanHTMLdocument.Thevalueofthispropertykeycontainsthenameoftheapplicationthatcreatedthedocument.Youshouldneveroverwritethispropertykeywiththenameofanotherapplication.The
![Page 113: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/113.jpg)
vti_originator
vti_generatorpropertykeyshouldbeusedtotracktheapplicationthatlast"generated"theHTMLpage.SimplyeditingadocumentinFrontPagewillchangethevalueofthevti_generatorpropertykeyto"MicrosoftFrontPage".Validvaluesare"MicrosoftWord","MicrosoftAccess","MicrosoftFrontPage",andsoon.
NoteFrontPagedeferstoWordwhenthere'sathemeconflictifthevti_generatorpropertykeycontains"MicrosoftWord".
Read-only
vti_privatetext
Thevalueofthispropertykeymustbeaninteger.Zeroornotpresentisthedefault.Anon-zerovaluemeansthatthepagewon'tbeaddedtoanytextindexes.Thispropertykeyonlyworkswiththebuilt-intextindexinginFrontPageandisnotrecognizedbyMicrosoftInternetInformationServices(IIS).
Read/write
vti_progid
Thiscorrespondstothe"progid"METAtaginanHTMLdocument.Thevalueofthispropertykeydetermineswhichapplicationopensthedocumentwhenauserclicks(ordouble-clicks)thedocument'sfilenameinWindowsExplorer.Validvaluesare"FrontPage.Editor.Document","Word.Document","Excel.Sheet","PowerPoint.Slide","Access.Application".
NoteFrontPagedeferstoWord
Read-only
![Page 114: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/114.jpg)
whenthere'sathemeconflictifthevti_generatorpropertykeycontains"MicrosoftWord".
vti_scriptlanguage Indicateswhichscriptinglanguageisenabledontheserver. Read-only
vti_secureserverurl
Retrievesthehttps://URL(securedURL)foraWebsite.ProvidesasecureenvironmentforconfidentialtransactionsovertheInternet.FormoreinformationseetheFrontPageServerExtensionsResourceKit.
Read-only
vti_serveripaddress
TheIPaddressoftheserver.
NoteAnIPaddressbeginningwith127representsalocalserver.
Read-only
vti_serverlanguageThelanguageoftheoperatingsystem.Usedforlocalizationpurposes.
Read-only
vti_showhiddenpages Trueifhiddenpagesaredisplayed. Read-only
vti_sourcecontrolcheckedoutby Authenticatednameoftheauthorwholastcheckedoutapage. Read-only
vti_sourcecontrolerror
Theerrorlastreturnedbythesourcecontrolsystem.ThiserrorisaddedtotheMETAtaginformationifanerroroccurswhilethefileisbeingaddedtoasourcecontrolproject.
Read-only
vti_sourcecontrolproject
Thenameofthesourcecontrolproject.ForaMicrosoftVisualSourceSafeproject,thestringwouldincludethe"$"symbol,asin"$/myProject"
Read-only
Thevalueofthispropertykeyisthetypeofsourcecontrolinuseonthat
![Page 115: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/115.jpg)
vti_sourcecontrolsystem
Website.CanbeMicrosoftVisualSourceSafeorMicrosoftFrontpageLightWeightsourcecontrol.Validvaluesforthesetwotypesofsourcecontrolare"VSS"and"LW",respectively.Thispropertykeyissetwhenasourcecontrolprojectisstarted.Formoreinformationonsourcecontrolprojects,seeManagingSourceControlProjects.
Read-only
vti_sourcecontrolversionAnumberedstringthatcontainstheversionofthesourcecontrolsystemthatisinuse.
Read-only
vti_textextensions
Aconcatenatedstringofextensionsthatarecommonlyusedtodenotetextfiles.Forexample,theconcatenatedstringmightcontain".txt.rpt..."
Read-only
vti_themedefault ThedefaultthemeoftheWebsite. Read-only
vti_themesusecss TrueifCSSisusedtopresentthetheme. Read/write
vti_timecreated
Thetimestampwhenthepagewascreated.ThetimestampisinUniversalTimeCoordinate(UTC)orGreenwichtime.
Read-only
vti_timelastmodified
Thetimethatthepagewaslastmodified.ThetimestampisinUTCtime.Thisisonlysetwhentheauthoreditsthepagedirectly.
Read-only
vti_timelastwrittenThetimethatthepagewaslastrewritten.ThetimestampisinUTCtime.
Read-only
vti_-title Thevalueofthetextbetweenthe<TITLE>tagsonthepage. Read-only
vti_usernames ThelistofknownusernamesforaspecifiedWebsite. Read-only
ThetypeofWebsiteserver.Valid
![Page 116: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/116.jpg)
vti_webservertypevaluesinclude,"MSIIS"forMicrosoftInternetInformationServicesand"PWS"forPersonalWebServer.
Read-only
vti_welcomenames
Aconcatenatedlistoffilenamesthatcanbeusedasthefilenameforthehomepage,suchas"index.htmindex.htmldefault.htm".
Read-only
![Page 117: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/117.jpg)
ThemesCollectionMultipleobjects Themes
Theme
AcollectionofThemeobjects.EachThemeobjectrepresentsathemeassociatedwithanHTMLpageoraWebsiteinMicrosoftFrontPage.TheThemeobjectisamemberoftheThemescollection.
![Page 118: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/118.jpg)
UsingtheThemescollection
UsetheThemespropertytoreturntheThemescollection.TheThemespropertycanbeusedwitheithertheApplicationortheWebExobject.TheThemespropertyfortheApplicationobjectisthecollectionofthemesavailableinFrontPage.TheThemespropertyfortheWebExobjectisthecollectionofthemesappliedtothefileswithinaWebsite,orthecollectionofthemesappliedtoaWebsite.ThefollowingstatementillustratesboththeThemesandCountpropertiesandreturnsthenumberofitemsintheThemescollectionthatareavailableinFrontPage.
myTotalThemeCount=Application.Themes.Count
ThefollowingstatementreturnsthenumberofthemeswithintheactiveWebsite.
myWebThemeCount=ActiveWeb.Themes.Count
UseThemes(index),whereindexistheindexnumberofathemeitem,toreturnasingleThemeobject.ThefollowingstatementreturnsthefirstthemeintheThemescollection.
myThemeOne=Application.Themes(0)
UsetheApplicationpropertytoreturntheApplicationobject.ThefollowingexamplereturnstheversionandbuildnumberofFrontPagefromwithintheThemescollection.
NoteTorunthisprocedureyoumusthaveatleastoneopenWebsite.
PrivateSubGetBuildNumber()
DimmyThemesAsThemes
DimmyBuildAsString
SetmyThemes=ActiveWeb.Themes
myBuild=myThemes.Application.Build
EndSub
![Page 119: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/119.jpg)
UsetheParentpropertywhenyouwanttoreturnthecontainerfortheThemescollection.Forexample,thefollowingstatementreturnstheURLassociatedwiththeparentcontaineroftheThemescollection.
myParentUrl=ActiveWeb.Themes.Parent.Url
![Page 120: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/120.jpg)
WebFilesCollectionMultipleobjects WebFiles
WebFileMultipleobjects
AcollectionofWebFileobjects.EachWebFileobjectrepresentsalloftheopenfilesinaWebsite.TheWebFileobjectisamemberoftheWebFilescollection.
![Page 121: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/121.jpg)
UsingtheWebFilesobject
UsetheFilespropertytoreturntheWebFilescollection.ThefollowingstatementreturnstheWebFileobjectsintheWebFilescollection.
SetmyWebFiles=Application.Webs(0).RootFolder.Files
UseWebFiles(index),whereindexistheordinalnumberofanitemintheWebFilescollection,toreturnasingleWebFileobject.ThefollowingstatementreturnsthefirstWebFileobjectinthecollection.
SetmyWebFile=ActiveWeb.RootFolder.Files(0)
UsetheAddmethodtoaddaWebFileobjecttotheWebFilescollection.ThefollowingstatementaddsanewWebFileobjecttothecollectionofWebFiles.
myWebFiles.Add("C:\NewWebWebFiles\SalesStatistics.htm")
UsetheApplicationpropertytoreturntheApplicationobjectfromwithintheWebFilescollection.ThefollowingstatementreturnstheApplicationobjectfromtheWebFilescollection.
myApp=ActiveWeb.RootFolder.Files.Application
UsetheCountpropertytoreturnthenumberofopenfilesintheWebFilescollection.ThefollowingstatementreturnsthenumberoffilesinthecollectionofWebFiles.
myCount=Webs(0).RootFolder.WebFiles.Count
UsetheDeletemethodtodeleteaWebFileobject.ThefollowingstatementdeletesthethirdfileintheWebFilescollection.
Webs(0).RootFolder.Files(2).Delete
UsetheParentpropertywhenyouwanttoreturnthecontainerfortheWebFilescollection.ThefollowingstatementreturnstheURLofthefolderforthesecondfileintheactiveWebsite.
myWebFileParent=ActiveWeb.RootFolder.Files(1).Parent.Url
![Page 122: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/122.jpg)
![Page 123: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/123.jpg)
WebFoldersCollectionMultipleobjects WebFolders
WebFolderMultipleobjects
AcollectionofWebFolderobjects.EachWebFolderobjectwithintheWebFolderscollectionrepresentsafolderinaWebsite.TheWebFolderobjectisamemberoftheWebFolderscollection.
NoteAllofthemethodsthatinvolvechangingthelocationofafolder,suchasCopyorMove,onlychangethelocationwithinthecurrentWebsite;youcannotmoveafolderfromoneWebsitetoaanotherWebsite.
![Page 124: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/124.jpg)
UsingtheWebFoldersobject
UseWebFolders(index),whereindexistheindexnumberofanitemintheWebFolderscollection,toreturnasingleWebFolderobject.ThefollowingexamplereturnsthefirstWebFolderobjectinthecollection.
SetmyFolder=ActiveWeb.RootFolder.Folders(0)
UsetheAddmethodtoaddanewWebFolderobjecttotheWebFolderscollectioninaWebsite.BothofthefollowingstatementsaddaWebFoldertothecollectionofWebFoldersintheactiveWebsite—parenthesesarenotrequiredforthefoldername,asshowninthesecondstatement.
NoteTheFolderUrlargumentwithinthequotes("CohoWinery")shouldonlyincludethenewfoldername,nottheentireURL,unlessyouareaddinganewURLtothelocationdesignatedastheFolderUrl.TheprogramwillfailiftheentireURLisincludedforexistingURLs.
ActiveWeb.RootFolder.Folders.Add("CohoWinery")
ActiveWeb.RootFolder.Folders.Add"CohoWinery"
UsetheCountpropertytoreturnthenumberoftotalnavigationnodesintheWebFolderscollection.ThefollowingstatementreturnsthenumberofWebfoldersintheCohoWineryWebsite.
Webs("C:\WebServerOne\CohoWinery").Folders.Count
UsetheDeletemethodtodeleteafolderfromaWebsite.ThefollowingstatementsdeletethetenthWebFolderobject.Thesecondstatementusesthenameofthefolderinsteadoftheindexnumbertodesignatethefoldertodelete.
ActiveWeb.RootFolder.Folders(9).Delete
ActiveWeb.RootFolder.Folders("TempFolder").Delete
UsetheCopymethodtocopyaWebFolderobject.Thefollowingexamplecopiesafolder(WebFolders(4))toanotherfolderontheactiveWebsite
![Page 125: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/125.jpg)
(ChardonnayInventory).Forpurposesofthisexample,WebFolders(4)isafoldernamedInventoryintheCohoWineryWebsite.Thisfoldercontainstheentirewineinventory—buttheWebdesignerwantedtofeaturethesaleonChardonnaywinesandcreatedatemporaryfolderthatwillbeeditedtocontainonlyChardonnaywine.
PrivateSubCopyInventory()
DimmyFolderAsWebFolder
SetmyFolder=ActiveWeb.RootFolder.Folders(4)
myFolder.Copy("C:\CohoWinery\ChardonnayInventory,False,True)
EndSub
UsetheParentpropertywhenyouwanttoreturnthecontainerfortheWebFolderscollection.Thefollowingstatementreturnsthecontainerforthefourthfolder.
myParent=Webs.RootFolder.Folders(3).Parent
![Page 126: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/126.jpg)
WebsCollectionApplication Webs
WebMultipleobjects
AcollectionofWebExobjects.EachWebExobjectrepresentsaWebsite,whichcaneitherbedisk-based(onalocalharddrive)orserver-based(onaWebserver).TheWebExobjectisamemberoftheWebscollection.
![Page 127: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/127.jpg)
UsingtheWebscollection
UsetheWebspropertytoreturntheWebscollection.YoucanalsousetheApplicationpropertytoreturntheApplicationobject.ThefollowingstatementusestheApplicationobjecttoreturnthefirstitemintheWebscollectionorusethesecondstatementtoreturntheentirecollectionofWebsites.
SetmyWebOne=Application.Webs(0)
SetmyWebs=Application.Webs
UseWebs(index),whereindexistheindexnumberofanitemintheWebscollection,toreturnasingleWebExobject.ThefollowingstatementreturnsthethirdWebsiteinthecollectionofopenWebExobjects.
SetmyGetWebThree=Webs(2)
UsetheAddmethodtoaddanitemtothelistofavailableitemsintheWebscollection.ThefollowingstatementaddstheCohoWineryWebsitetotheWebscollection.Ifitdoesn'texist,FrontPagewillcreateanewWebsiteatthespecifiedpathandopenit.
Webs.Add("C:\MyDocuments\MyWebSites\CohoWinery")
UsetheApplicationpropertytoreturninformationabouttheapplicationfromwithintheWebscollection.ThefollowingstatementreturnstheversionnumberoftheApplicationobject.
ActiveWeb.Webs.Application.Version
UsetheCountpropertytoreturnthenumberofopenWebsitesintheWebscollection.ThefollowingstatementreturnsthenumberofopenWebsites.
Webs.Count
UsetheDeletemethodtopermanentlydeleteaWebsitefromtheWebscollection.ThefollowingstatementdeletestheCohoWineryWebsite.
![Page 128: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/128.jpg)
Webs.Delete("C:\MyDocuments\MyWebSites\CohoWinery")
UsetheOpenmethodtoopenaWebsite.ThefollowingstatementopensaWebsiteandaddsittothecollectionofitemsintheWebscollection.
Webs.Open("C:\MyDocuments\MyWebSites\CohoWinery")
UsetheParentmethodwhenyouwanttoreturnthecontaineroftheWebscollection,whichistheapplication.ThefollowingstatementreturnstheApplicationobject.
SetmyParent=Webs.Parent
![Page 129: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/129.jpg)
WebWindowsCollection
Multipleobjects WebWindowsWebWindowMultipleobjects
AcollectionofWebWindowExobjects.EachWebWindowobjectrepresentsanopenWebsiteinMicrosoftFrontPage.TheWebWindowExobjectisamemberoftheWebWindowscollection.
![Page 130: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/130.jpg)
UsingtheWebWindowsCollection
UseItems(index),whereindexistheindexnumberofanitemintheWebWindowscollection,toreturnasingleWebWindowExobject.ThefollowingexamplereturnstheCaptionpropertyforthefourthitemintheWebWindowscollection.
FunctionReturnWebWindowCaption()AsString
DimmyCaptionAsString
DimmyWebWindowAsWebWindowEx
SetmyWebWindow=Application.WebWindows(3)
myCaption=myWebWindow.Caption
ReturnWebWindowCaption=myCaption
EndSub
UsetheWebWindowspropertytoreturntheWebWindowscollection.ThefollowingexampleclosesalloftheopenWebWindowExobjectsintheWebWindowscollectionexcepttheActiveWebWindowobject.
PrivateSubCloseWebWindows
DimmyWebWindowsAsWebWindows
DimmyWebWindowAsWebWindowEx
DimmyActiveWebWindowAsWebWindowEx
SetmyWebWindows=Application.WebWindows
SetmyActiveWebWindow=ActiveWebWindow
ForEachmyWebWindowInmyWebWindows
IfmyWebWindow.Caption<>myActiveWebWindow.CaptionThen_
myWebWindow.Close
Next
EndSub
UsetheApplicationpropertytoreturntheApplicationobject.Ifyou'realreadyworkingwiththeWebWindowscollectionandyou'dliketochecktheversionnumberoftheapplication,youcaneasilyaccessitthroughyourWithmyWebWindowsstatementasshowninthefollowingexample.
WithmyWebWindows
myWebWindowCount=myWebWindows.Count
![Page 131: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/131.jpg)
myAppVersion=.Application.Version
IfmyAppVersion<"4.0"Then
MsgBox"PleaseupgradeyourFrontPagesoftware."
Else
ForEachmyWebWindowInmyWebWindows
myCaption=myWebWindow.Caption
WithmyPageWindows
myPageCount=PageWindows.Count
EndWith
Next
EndIf
EndWith
YoucanusetheClosemethodtocloseanindividualWebWindowExobject,multipleWebWindowExobjects,orallWebWindowExobjectsinFrontPage.FormoredetailsontheClosemethod,seetheusagedescribedinthefollowingtable.
ImportantFrontPagewillclosetheapplicationifyouusetheClosemethodtocloseallWebWindowExobjectsinFrontPage.
CloseMethodUsage Code
CloseanindividualWebWindowExobjectintheapplication
Application.WebWindows(index).Close
or
Application.WebWindows.Close(index)
ClosemultipleWebWindowExobjectsintheapplication(asshowninthepreviousexample)
ForEachmyWebWindowInmyWebWindows
IfmyWebWindow.Caption<>_
myActiveWebWindow.CaptionThen_
myWebWindow.Close
Next
CloseallWebWindowExobjectsintheapplication
Application.WebWindows.Close
Closeanindividual Webs(index).WebWindows(index).Close
![Page 132: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/132.jpg)
WebWindowExobjectinaWebsite
ClosemultipleWebWindowExobjectsinaWebsite
SetmyWeb=Web(index).WebWindows
ForEachmyWebWindowInmyWebWindows
IfmyWebWindow.Caption_
<>myActiveWebWindow.CaptionThen_
myWebWindow.Close
Next
CloseacollectioninaWebsite
Webs(index).WebWindows.Close
ClosingallWebWindowExobjectsinFrontPagefunctionsthesameastheQuitmethod
Theexpression,Application.WebWindows.Closeisthesameas,Application.Quit.
UsetheCountpropertytoreturnthenumberofWebWindowExobjectsinthecollection.ThefollowingexamplereturnsthenumberofWebWindowExobjects.
Web.WebWindows.Count
UsetheParentpropertywhenyouwanttoreturnthecontainerfortheWebWindowscollection.ThefollowingstatementreturnstheApplicationobject.
Application.WebWindows.Parent.Name
![Page 133: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/133.jpg)
ApplicationObjectApplication Multipleobjects
RepresentstheMicrosoftFrontPageapplication.TheApplicationobjectincludespropertiesandmethodsthatreturntop-levelobjects.Forexample,theActiveDocumentpropertyreturnsadocumentobjectthatreferencestheFrontPagePageobjectmodelthatiscompatiblewithMicrosoftInternetExplorer4.0andlater.
![Page 134: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/134.jpg)
UsingtheApplicationObject
UsetheApplicationpropertytoreturntheApplicationobject.YoucanusetheApplicationpropertyfromanyoftheobjectsinFrontPage.ThefollowingexampleaccessestheApplicationobject,andthendisplaystheOpendialogbox.
Application.FileDialog(msoFileDialogOpen).Show
Manyofthepropertiesandmethodsthatreturnthemostcommonuser-interfaceobjects,suchastheActiveDocumentproperty,canbeusedwithouttheApplicationobjectqualifier.Forexample,insteadofwritingApplication.ActiveDocument.Title,youcanwriteActiveDocument.Title.PropertiesandmethodsthatcanbeusedwithouttheApplicationobjectqualifierareconsidered"global."ToviewglobalpropertiesandmethodsintheObjectBrowser,click<globals>atthetopofthelistintheClassesboxoftheObjectBrowser.
![Page 135: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/135.jpg)
Remarks
TouseAutomationtocontrolFrontPagefromanotherapplication,usetheCreateObjectorGetObjectfunctiontoreturnaFrontPageApplicationobject.ThefollowingMicrosoftWordVisualBasicforApplications(VBA)examplestartsFrontPage,opensanexistingWebsite,andclosestheWebsite.
PrivateSubStartFrontPage()
DimmyNewFPAsVariant
SetmyNewFP=CreateObject("FrontPage.Application")
myNewFP.Webs.Open("C:\MyWebs\AdventureWorks")
myNewFP.Webs.Close"(C:\MyWebs\AdventureWorks")
SetmyNewFP=Nothing
EndSub
![Page 136: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/136.jpg)
BasicListObjectBasicList Multipleobjects
ContainsinformationaboutthebasiclisttypeusedwithinMicrosoftFrontPage.TheBasicListobjectallowsuserstoshareandcategorizeinformationbetweenWebsites.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 137: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/137.jpg)
UsingtheBasicListobject
UseLists.item(index),whereindexiseitherthenameofthebasiclistoritsnumericpositionwithinthecollection,toreturnasingleBasicListobject.ThefollowingexampledisplaysthenamesofallbasiclistsintheactiveWebsite.IftheWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubListAllLists()
'Displaysthenamesofallbasiclistsinthecollection
DimlstWebListAsList
DimstrNameAsString
DimblnFoundAsBoolean
'Setfoundflagtofalse
blnFound=False
'Checkifanylistsexistand,ifsocyclethroughthem
IfNotActiveWeb.ListsIsNothingThen
ForEachlstWebListInActiveWeb.Lists
IflstWebList.Type=fpListTypeBasicListThen
'Setbooleanflagtofoundandnamestostring
blnFound=True
IfstrName=""Then
strName=lstWebList.Name&vbCr
Else
strName=strName&lstWebList.Name&vbCr
EndIf
EndIf
Next
IfblnFound=TrueThen
'Displaynamesofallbasiclists
MsgBox"ThenamesofallbasiclistsinthecurrentWebare:"_
&vbCr&strName
Else
MsgBox"TherearenobasiclistsinthecurrentWeb."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebcontainsnolists."
EndIf
EndSub
![Page 138: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/138.jpg)
UsetheListscollection'sAddmethodtocreateanewlistoftypefpListTypeBasicList.ThefollowingexamplecreatesanewlistcalledNewShare.
SubNewList()
'AddsanewlisttothecurrentWebsite
DimobjAppAsFrontPage.Application
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewlistanddisplaysamessagetotheuser.
objLists.AddName:="NewShare",_
ListType:=fpListTypeBasicList,_
Description:="ListofSharedfiles"
MsgBox"AnewlistwasaddedtotheListscollection."
EndSub
![Page 139: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/139.jpg)
DiscussionObjectDiscussion Multipleobjects
ContainsinformationaboutaDiscussionlistinaMicrosoftFrontPageWebsite.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftWindowsSharePointServices.
![Page 140: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/140.jpg)
UsingtheDiscussionobject
UsetheItempropertyfortheListscollectiontoreturnasingleDiscussionobject.ThefollowingexampleassumesthefirstlistintheactiveWebsiteisaDiscussionobject,andthenreturnsit.
DimobjDiscussionAsDiscussion
SetobjDiscussion=ActiveWeb.Lists(0)
![Page 141: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/141.jpg)
DocumentLibraryObjectDocumentLibrary Multipleobjects
RepresentsthecollectionofdocumentsinthecurrentWebsite.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 142: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/142.jpg)
UsingtheDocumentLibraryobject
UseLists.Item(index),whereindexiseitherthenameofthedocumentlibraryoritsnumericpositionwithinthecollection,toreturnasingleDocumentLibraryobject.ThefollowingexampledisplaysthenamesofalldocumentlibrariesintheactiveWebsite.IftheWebsitecontainsnodocumentlibraries,amessageisdisplayedtotheuser.
SubListAllLibraries()
'Displaysthenamesofalldocumentlibraries
'inthecollection.
DimlstWebListAsList
DimstrNameAsString
DimblnFoundAsBoolean
'Setfoundflagtofalse
blnFound=False
'Checkifanylistsexistandisso,cyclethroughthem
IfNotActiveWeb.ListsIsNothingThen
ForEachlstWebListInActiveWeb.Lists
IflstWebList.Type=fpListTypeDocumentLibraryThen
'Setbooleanflagtofoundandaddnametostring
blnFound=True
IfstrName=""Then
strName=lstWebList.Name&vbCr
Else
strName=strName&lstWebList.Name&vbCr
EndIf
EndIf
Next
IfblnFound=TrueThen
'Displaynamesofalldocumentlibraries
MsgBox"Thenamesofalldocumentlibrariesinthecurrentwebsiteare:"_
&vbCr&strName
Else
MsgBox"Therearenodocumentlibrariesinthecurrentwebsite."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
![Page 143: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/143.jpg)
UsetheListobject'sAddmethodtocreateanewlistoftypefpListTypeDocumentLibrary.ThefollowingexamplecreatesanewdocumentlibrarycalledNewlibrary.
SubNewLibrary()
'Addsanewlisttothecurrentwebsite
DimobjAppAsFrontPage.Application
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewlist
objLists.AddName:="NewLibrary",_
ListType:=fpListTypeDocumentLibrary,_
Description:="ListofSharedfiles"
'Displaymessagetouser
MsgBox"AnewlibrarywasaddedtotheListscollection."
EndSub
![Page 144: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/144.jpg)
ListObjectMultipleobjects Lists
ListMultipleobjects
ContainsinformationabouttheListobjectandtheMicrosoftFrontPagecollaborationobjects.TheListobjectisabaseclassthatdefinesthecommonmembersusedbythedifferenttypesoflistsinFrontPage.Forexample,thecollaborationobjects,—theBasicList,Discussion,DocumentLibrary,andSurveyobjects—allowinformationtobesharedandexchangedbetweendifferentusersanddifferentwebsites.TheListobjectisamemberoftheListscollection.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 145: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/145.jpg)
UsingtheListobject
UseLists.Item(index),whereindexiseitherthenameofthelistoritsnumericpositionwithinthecollection,toreturnasingleListobject.ThefollowingexampledisplaysthenamesofalllistsintheactiveWebsite.IftheWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubListAllLists()
'Displaysthenamesofalllistsinthecollection
DimlstWebListAsList
DimstrNameAsString
'Checkifanylistsexist
IfNotActiveWeb.ListsIsNothingThen
'Cyclethroughlists
ForEachlstWebListInActiveWeb.Lists
'addlistnamestostring
IfstrName=""Then
strName=lstWebList.Name&vbCr
Else
strName=strName&lstWebList.Name&vbCr
EndIf
Next
'Displaynamesofalllists
MsgBox"Thenamesofalllistsinthecurrentwebare:"_
&vbCr&strName
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
Similarly,usetheWebFolderobject'sListpropertytoreturntheListobjectassociatedwiththefolder.
UsetheListobject'sFieldspropertytoreturnacollectionofListFieldobjectsthatdefinethefieldsinthecurrentlist.
![Page 146: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/146.jpg)
![Page 147: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/147.jpg)
ListFieldObjectMultipleobjects ListFields
ListFieldWeb
ContainsinformationaboutthefieldsthatmakeupaListobject.Thefieldsofalistdefinethecolumnsthatappearinthelistandpresentinformationabouttheitemsinthelist.TheListFieldobjectisabaseclassthatdefinesthecommonmembersusedbythedifferenttypesoffieldsinMicrosoftFrontPagelists.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 148: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/148.jpg)
UsingtheListFieldobject
UseListFields.Item(index),whereindexistheeithernameofthefieldorit'spositionwithinthecollectiontoreturnasingleListFieldobject.Thefollowingexampledisplaysthenamesofallfieldsinthecurrentlist.IftheWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubListAllFields()
'Displaysthenameoffieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
NextobjField
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebsitecontainsnolists."
EndIf
EndSub
![Page 149: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/149.jpg)
ListFieldAttachmentsObjectListFieldAttachments Web
ContainsinformationabouttheattachmentsfieldwhenattachmentsareenabledforalistinaMicrosoftFrontPageWebsite.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftWindowsSharePointServices.
![Page 150: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/150.jpg)
UsingtheListFieldAttachmentsobject
UsetheItempropertyfortheListFieldscollectiontoreturnasingleListFieldAttachmentsobject.ThefollowingexamplereturnsthefirstfieldinthethefirstlistintheListscollection.
DimobjListAsBasicList
DimobjFieldAsListFieldAttachments
SetobjList=ActiveWeb.Lists(0)
SetobjField=objList.Fields(0)
![Page 151: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/151.jpg)
ListFieldChoiceObjectListFieldChoice Web
Containsinformationaboutthechoicefield.Thechoicefieldallowstheusertoselectfromaspecifiednumberofoptionsbyprovidingadrop-downlistorradiobuttonsinthelist.
![Page 152: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/152.jpg)
UsingtheListFieldChoiceobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpFieldChoicetoreturnasingleListFieldChoiceobject.
UsetheListFields.AddmethodtoaddafieldoftypefpFieldChoicetotheListFieldscollection.ThefollowingexampleaddsanewfieldnamedNewChoiceFieldoftypefpFieldChoice,totheListFieldscollection.UsetheAddChoicemethodtoaddchoicestothelist.Usetheclearmethodtoclearthechoicesfromthelist.
SubDisplayChoice()
'Displaychoice
DimobjAppAsFrontPage.Application
DimobjLstFldsAslistFields
DimobjFldChoiceAsListFieldChoice
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewChoiceField"
'AddnewfieldoftypefpFieldChoicetolist
objLstFlds.AddName:=strName,Description:="NewChoicevalueField",_
Fieldtype:=fpFieldChoice,Required:=True
MsgBox"AnewFieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 153: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/153.jpg)
ListFieldComputedObjectListFieldComputed Web
Containsinformationaboutfieldscreatedautomaticallybythecomputer.TheListFieldComputedobjectcannotbecreatedbytheuserandinsteadisusedbyMicrosoftFrontPagetocreateareferencefromthelisttoapageintheWebsite.Forexample,inmanylists,theTitlefieldiscreatedbythecomputerandisusedtoreferencethepagecorrespondingtothelistfield.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 154: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/154.jpg)
UsingtheListFieldComputedobject
UseListFields.Item(index)toreturnaListFieldComputedobject,whereindexiseitherthenameofthefieldoritsnumericpositionwithinthecollection.Thefollowingexampledisplaysthenamesofallcomputedfieldsinthecurrentlist.
SubListComputedFields()
'Displaythenamesofcomputedfieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
'Checkifitisacomputedfield
IfobjField.Type=fpFieldComputedThen
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
EndIf
NextobjField
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebsitecontainsnolists."
EndIf
EndSub
![Page 155: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/155.jpg)
ListFieldCounterObjectListFieldCounter Web
Containsinformationaboutthekeycounterusedwithinthelist.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 156: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/156.jpg)
Remarks
ThisfieldiscreatedautomaticallybyMicrosoftFrontPageandcannotbemodifiedbytheuser.
![Page 157: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/157.jpg)
UsingtheListFieldCounterobject
Thefollowingexampledisplaysthenameassociatedwiththecounterfieldinthecurrentlist.
SubListCounterFields()
'Displaysthenameofcounterfieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
DimblnFoundAsBoolean
blnFound=False
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
'CheckifitisacomputedfieldoftypefpFieldFile
IfobjField.Type=fpFieldCounterThen
blnFound=True
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
EndIf
NextobjField
IfblnFound=TrueThen
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
MsgBox"Therearenocounterfieldsinthelist."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebsitecontainsnolists."
EndIf
EndSub
![Page 158: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/158.jpg)
![Page 159: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/159.jpg)
ListFieldCurrencyObjectListFieldCurrency Web
Containsinformationaboutthefieldtypeusedtoviewcurrencyinformationwithinthelist.TheListFieldCurrencyobjectallowsyoutoviewinformationaboutdifferentcurrencytypeswithinthecurrencyfieldofthelist.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 160: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/160.jpg)
UsingtheListFieldCurrencyobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpListFieldCurrency,toreturnasingleListFieldCurrencyobject.
UsetheListFields.AddmethodtoaddafieldoftypefpFieldCurrencytotheListFieldscollection.ThefollowingexampleaddsanewfieldnamedNewCurrencyFieldoftypefpFieldCurrencytotheListFieldscollectionandchangesthecurrencytypetodisplayCanadiandollars.
SubCreateCurrencyField()
'AddnewCurrencyfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjFldChoiceAsListFieldCurrency
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewCurrencyField"
'AddnewFieldoftypefpFieldCurrencytolist
objLstFlds.AddName:=strName,Description:="NewCurrencyField",_
Fieldtype:=fpFieldCurrency,Required:=True
SetobjFldChoice=objLstFlds.Item("NewCurrencyField")
'ChangecurrencytypetoCanadian
objFldChoice.Currency=fpCurrencyFieldCanada
MsgBox"AnewFieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 161: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/161.jpg)
ListFieldDateTimeObjectListFieldDateTime Web
ContainsinformationaboutthefieldusedtodisplaydatesandtimeswithinaMicrosoftFrontPagelist.TheListFieldDateTimeobjectallowsyoutoviewdateandtimeinformationinavarietyofdifferentconfigurationsdependingonthetypeofdatainthelist.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 162: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/162.jpg)
UsingtheListFieldDateTimeobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpListFieldDateTime,toreturnasingleListFieldDateTimeobject.
UsetheListFields.AddmethodtoaddafieldoftypefpListFieldDateTimetotheListFieldscollection.ThefollowingexampleaddsanewfieldnamedNewDateTimeFieldoftypefpListFieldDateTimetotheListFieldscollection.
SubCreateDateTimeField()
'AddnewDate/Timefield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewDateTimeField"
'AddnewFieldoftypefpFieldDateTimetolist
objLstFlds.AddName:=strName,Description:="NewDateTimeField",_
Fieldtype:=fpFieldDateTime,Required:=True
MsgBox"AnewFieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 163: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/163.jpg)
ListFieldFileObjectListFieldFile Web
Containsinformationaboutanyfilescontainedinthelist.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 164: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/164.jpg)
Remarks
ThisfieldiscreatedautomaticallybyMicrosoftFrontPageandcannotbemodifiedbytheuser.
![Page 165: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/165.jpg)
UsingtheListFieldFileobject
ThefollowingexampledisplaysthenamesofallfieldsoftypefpFieldFileintheactivelist.Ifnofieldsofthistypeexist,oriftheWebcontainsnolists,amessageisdisplayedtotheuser.
SubListFileFields()
'Displaysthenameoffilefieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
DimblnFoundAsBoolean
blnFound=False
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
'CheckifitisacomputedfieldoftypefpFieldFile
IfobjField.Type=fpFieldFileThen
blnFound=True
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
EndIf
NextobjField
IfblnFound=TrueThen
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
MsgBox"Therearenofilefieldsinthelist."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
![Page 166: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/166.jpg)
![Page 167: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/167.jpg)
ListFieldIntegerObjectListFieldInteger Web
Containsinformationaboutfieldscreatedautomaticallybythecomputer.TheListFieldintegerobjectcannotbecreatedbytheuserandinsteadisusedbyMicrosoftFrontPagetocreateanIDforeachiteminthelist.Forexample,inatypicallist,theIDfieldiscreatedbythecomputerasauniqueidentifierforeachiteminthelist.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 168: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/168.jpg)
UsingtheListFieldIntegerobject
UseListFields.Item(index)toreturnaListFieldIntegerobject,whereindexiseitherthenameofthefieldoritsnumericpositionwithinthecollection.ThefollowingexampledisplaysthenamesofallIntegerfieldsinthecurrentlist.IftheWebsitecontainsnolists,orifthelistcontainsnoIntegerfields,amessageisdisplayedtotheuser.
SubListIntegerFields()
'DisplaysthenameofIntegerfieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
DimblnFoundAsBoolean
blnFound=False
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
'CheckifitisacomputedfieldoftypefpFieldInteger
IfobjField.Type=fpFieldIntegerThen
blnFound=True
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
EndIf
NextobjField
IfblnFound=TrueThen
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
MsgBox"TherearenoIntegerfieldsinthelist."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 169: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/169.jpg)
![Page 170: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/170.jpg)
ListFieldLookupObjectListFieldLookup Multipleobjects
ContainsinformationabouttheLookupfield.TheListFieldLookupobjectallowsyoutosearchforinformationwithinthegivenWebsitebasedonaspecifiedfield.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 171: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/171.jpg)
UsingtheListFieldLookupobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpFieldLookup,toreturnasingleListFieldLookupobject.
UsetheListFields.AddmethodtoaddafieldoftypeListFieldLookuptotheListFieldscollection.
ThefollowingexampleaddsanewfieldnamedNewFileLookupFieldoftypefpFieldLookuptotheListFieldscollection.
SubCreateLookup()
'AddnewLookupfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjFldLookupAsListFieldLookup
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewFileLookupField"
'AddnewFieldoftypefpFieldLookuptolist
objLstFlds.AddName:=strName,Description:="NewLookupField",_
Fieldtype:=fpFieldLookup
SetobjFldLookup=objLstFlds.Item("NewFileLookupField")
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 172: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/172.jpg)
ListFieldMultiLineObjectListFieldMultiLine Web
Containsinformationaboutthefieldusedtodisplayinformationcontainingmorethanonelineoftext.Forexample,theListFieldMultiLineobjectcanbeusedtodisplaydescriptionsandsummaries,whichoftenrequiremorethanasingleline.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 173: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/173.jpg)
UsingtheListFieldMultiLineobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpFieldMultiLine,toreturnasingleListFieldMultiLineobject.
UsetheListFields.AddmethodtoaddafieldoftypefpFieldMultiLinetotheListFieldscollection.
ThefollowingexampleaddsanewfieldnamedDescriptionoftypefpFieldMultiLinetotheListFieldscollection.Thesubroutinedisplaysthenameofthenewfieldaswellasthenumberoflinesitwillcontain.
SubCreateMultiLine()
'AddnewMultiLineField
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjLstFldMultiAsListFieldMultiLine
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="Description"
'AddnewFieldoftypefpFieldMultiLinetolist
objLstFlds.AddName:=strName,Description:="DescriptionField",_
Fieldtype:=fpFieldMultiLine
SetobjLstFldMulti=objLstFlds.Item(strName)
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&".Itcontains"&_
objLstFldMulti.NumberOfLines&"lines."
EndSub
![Page 174: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/174.jpg)
ListFieldNumberObjectListFieldNumber Web
ContainsinformationabouthownumbersaredisplayedinMicrosoftFrontPagelistfields.TheListFieldNumberobjectallowsyoutoconfigurethewayinwhichyouviewnumbersinFrontPagelists.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 175: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/175.jpg)
UsingtheListFieldNumberobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpFieldNumber,toreturnasingleListFieldNumberobject.
UsetheListFields.AddmethodtoaddafieldoftypefpFieldNumbertotheListFieldscollection.ThefollowingexampleaddsanewfieldnamedTotaloftypefpFieldNumbertotheListFieldscollection.Thesubroutinedisplaysthenameofthenewfieldandthenameofthelisttowhichitwasadded.
UsetheListFieldNumberobject'sDisplayFormatpropertytochangethewayinwhichthedatawillbedisplayedinthefield.
SubCreateNumberField()
'AddnewMultiLineField
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="Total"
'AddnewFieldoftypefpFieldNumbertolist
objLstFlds.AddName:=strName,Description:="NumericTotalField",_
Fieldtype:=fpFieldNumber
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 176: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/176.jpg)
ListFieldRatingScaleObjectListFieldRatingScale Web
ContainsinformationabouttheratingscalelistfieldforalistinaMicrosoftFrontPageWebsite.TheListFeldRatingScaleobjectisonlyavailableforsurveylists.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftWindowsSharePointServices.
![Page 177: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/177.jpg)
UsingtheListFieldRatingScaleObject
UsetheItempropertyfortheListFieldscollectiontoreturnasingleListFieldRatingScaleobject.ThefollowingexamplereturnsthefirstfieldinthefirstlistintheListscollection.ThisexampleassumesthatthefirstlistintheactiveWebisaWebsurveylist.
DimobjListAsBasicList
DimobjFieldAsListFieldRatingScale
SetobjList=ActiveWeb.Lists(0)
SetobjField=objList.Fields(0)
![Page 178: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/178.jpg)
ListFieldsCollectionMultipleobjects ListFields
RepresentsacollectionofListFieldobjectsthatdefinethetextfieldsusedwithinMicrosoftFrontPagelists.TheListFieldobjectisabaseclassthatdefinesthecommonmembersusedbythedifferenttypesoffieldsinFrontPage.Forexample,theListFieldCurrencyandListFieldNumberobjectsallowyoutocustomizethewayinwhichcurrencyandnumericinformationisdisplayed.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 179: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/179.jpg)
UsingtheListFieldscollection
UseFields.Item(index),whereindexiseitherthenameofthelistoritspositionwithinthecollection,toreturnasingleListFieldobject.ThefollowingexampledisplaysthenamesofallfieldsinthefirstlistoftheactiveWebsite.IftheWebsitecontainsnolists,amessageisdisplayedtotheuser.
UsetheAddmethodtoaddanewListFieldobjecttotheListFieldscollection.
SubListFields()
'Displaythenamesoffieldsinthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
IfstrType=""Then
'Createnewstring
strType=objField.Name&vbCr
Else
'Addnextfieldnametostring
strType=strType&objField.Name&vbCr
EndIf
NextobjField
MsgBox"Thenamesofthefieldsinthislistare:"&_
vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
![Page 180: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/180.jpg)
![Page 181: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/181.jpg)
ListFieldSingleLineObjectListFieldSingleLine Web
Containsinformationaboutthesinglelinefield.ThefpFieldSingleLineobjectisusedtodisplayinformationthattypicallyrequiresnomorethanasinglelineoftext.Forexample,theNameandTitlefieldstypicallyusetheListFieldSingleLineobjecttodisplayinformation.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 182: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/182.jpg)
UsingtheListFieldSingleLineobject
ThefollowingexamplecreatesanewfieldoftypeListFieldSingleLinenamedAlternativeName.Thesubroutinedisplaysthenameofthenewfieldandthenameofthelisttowhichitwasadded.
SubCreateSingleLineField()
'AddnewSingleLineField
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="AlternativeName"
'AddnewFieldoftypefpFieldSingleLinetolist
objLstFlds.AddName:=strName,Description:="NumericTotalField",_
Fieldtype:=fpFieldSingleLine
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 183: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/183.jpg)
ListFieldTrueFalseObjectListFieldTrueFalse Web
ContainsinformationabouttheBooleanfieldinaMicrosoftFrontPagelist.TheListFieldTrueFalseobjectallowsyoutoprovidetheuserwithasimple,binaryuser-interfaceoption.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 184: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/184.jpg)
UsingtheListFieldTrueFalseobject
ThefollowingexamplecreatesanewfieldoftypefpFieldTrueFalsenamedDefaultPage.Thesubroutinedisplaysthenameofthenewfieldandthenameofthelisttowhichitwasadded.
SubCreateTrueFalseField()
'AddnewTrueFalsefield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="DefaultPage"
'AddnewFieldoftypefpFieldTrueFalsetolist
objLstFlds.AddName:=strName,Description:="Determinesifthisis"&_
"defaultpage",Fieldtype:=fpFieldTrueFalse
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 185: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/185.jpg)
ListFieldURLObjectListFieldURL Web
ContainsinformationabouttheMicrosoftFrontPagefieldusedtodisplayURLs.TheListFieldURLobjectallowsyoutocustomizethewayURLsappearinthelistfields.TheURLcanbedisplayedasanimageorasalink.UsetheDisplayFormatpropertytochangetheviewsettings.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 186: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/186.jpg)
UsingtheListFieldURLobject
UseListFields.Item(index),whereindexisthenameorordinalpositionofafieldoftypefpFieldURL,toreturnasingleListFieldURLobject.
ThefollowingexamplecreatesanewfieldoftypefpFieldURLanddisplaysthenameofthenewfieldandthenameofthelistintowhichitwasinserted.
SubCreateURLField()
'AddnewURLfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="Location"
'AddnewFieldoftypefpFieldURLtolist
objLstFlds.AddName:=strName,Description:="Displaysfilelocations",_
Fieldtype:=fpFieldURL
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 187: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/187.jpg)
NavigationNodeObjectMultipleobjects NavigationNode
Multipleobjects
RepresentsanodeinthenavigationalstructureofaWebsite.TheNavigationNodeobjectisamemberoftheNavigationNodescollection.WithintheNavigationNodescollection,individualNavigationNodeobjectsareindexedbeginningwithzero.
ImportantFromtheNavigationNodeobject,youcanaccessallothernavigationnodesinaWebsite.TheRootNavigationNodeobject,createdbydefaulteachtimeyoucreateanewWebsite,providesthebasisforthenavigationstructure,whichisaccessedthroughtheChildrenproperty.ThefirstchildnodeofthenavigationstructureisusuallythehomepageoftheWebsite,whichcanbeaccessedthroughtheHomeNavigationNodeproperty.However,thefirstchildnodeoftherootnavigationnodecanbeanypage,andmaynotcontainaHomeNavigationNodeobjectatall.
![Page 188: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/188.jpg)
UsingtheNavigationNodeobject
YoucanusetheNavigationNodepropertytoreturntheNavigationNodeobject.ThefollowingexamplebuildsalistofnavigationnodelabelsfortheWebFileobjectoftheWebFilescollection.
PrivateSubGetNavigationNode()
DimmyWebAsWebEx
DimmyWebFilesAsWebFiles
DimmyWebFileAsWebFile
DimmyNavNodeLabelAsString
DimmyLabelAsString
OnErrorResumeNext
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyFiles
ForEachmyFileInmyFiles
myLabel=myFile.NavigationNode.Label
IfErr<>0ThenExitSub
myNavNodeLabel=myNavNodeLabel&myLabel&vbCRLF
Next
EndWith
EndSub
TheChildrenpropertyreturnsthecollectionofchildnodeswithinthenavigationstructureofaWebsite.ThefollowingstatementreturnsthenumberofchildnodeswithinthenavigationstructureoftheactiveWebsite.
myNavChildrenCount_
=ActiveWeb.RootFolder.Files(0).NavigationNode.Children.Count
UseChildren(index),whereindexistheindexnumberofanavigationnodeitem,toreturnasingleNavigationNodeobject.ThefollowingstatementreturnsthefilenameofthefirstnavigationnodeintheNavigationNodescollection.
myNavNodeName_
=ActiveWeb.RootFolder.Files(0).NavigationNode.Children(0).File.Name
![Page 189: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/189.jpg)
TheFilepropertyreturnstheFileobjectthatisassociatedwiththeNavigationNodeobject.ThefollowingstatementreturnsTrueifthefileisopen.
myNavFile=ActiveWeb.RootFolder.Files(3).NavigationNode.File.IsOpen
TheHomepropertyreturnstheHomeobjectassociatedwiththecurrentnavigationnodeandreferencesinformationsuchastheChildren,File,Label,Next,Prev,andotherpropertiesforthehomepage.ThefollowingstatementreturnstheURLoftheHomepropertyfortheNavigationNodeobject.
myHomePageUrl_
=ActiveWeb.RootFolder.Files(5).NavigationNode.Home.Url
YoucanreturntheLabelpropertytosetorreturntextthatcanbeusedasbuttonswithinthenavigationstructure,orusedfortextinalinkbar.Thefollowingexamplereturnsthelabelforthehomepage.
myLabel=ActiveWeb.RootFolder.Files(0).NavigationNode.Label
UsetheNext,Parent,Prev,orUrlpropertiestoreturnnavigationnodesassociatedwiththespecifiedproperty.ThefollowingexamplereturnstheURLthatisassociatedwiththepreviousNavigationNodeobject.
myPrevNode=ActiveWeb.RootFolder.Files(1).NavigationNode.Prev.Url
UsetheWebpropertytoreturntheWebExobjectassociatedwiththecurrentnavigationnode.ThefollowingexamplereturnstheWebExobjectforthecurrentnavigationnode.
myNavNodeWeb=_
ActiveWeb.RootFolder.Files(2).NavigationNode.Web.Url
UsetheMovemethodtomoveanavigationnodefromonechildnodetoanother.ThefollowingexamplemovesanavigationnodetoachildlocationonasiblingnodeinthesameWebsite.
PrivateSubMoveNavNode()
DimmyNodesAsNavigationNodes
![Page 190: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/190.jpg)
DimmyNodeAsNavigationNode
SetmyNodes=ActiveWeb.RootNavigationNode.Children
SetmyNode=myNodes(4)
myNode.MovemyNodes,myNodes(2)
ActiveWeb.ApplyNavigationStructure
EndSub
![Page 191: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/191.jpg)
PageWindowExObjectPageWindowEx Multipleobjects
RepresentsanopeneditorsessionandencapsulatestheMicrosoftFrontPagePageobjectmodelthatiscompatiblewiththeDocumentobjectmodelforMicrosoftInternetExplorer4.0andlater.ThePageWindowExobjectisamemberofthePageWindowscollectionandrepresentsalloftheopenpagewindowsinthespecifiedWebsite.WithinthePageWindowscollection,individualPageWindowExobjectsareindexedbeginningwithzero.
NoteYoucanalsosubstitutetheCaptionpropertyofthePageWindowobjectinsteadoftheindexnumberwhenaccessingaPageWindowExobject.ThisonlyworkswhenthePageWindowExobjecthasalreadybeensaved.ThefollowingstatementsreturnthePageWindowExobjectforanopenpagewindowthathasacaptionof"C:\MyWebSites\CohoWinery\Zinfandel.htm").
SetobjPageWindow=ActiveWebWindow.PageWindow("Zinfandel.htm")
SetobjPageWindow=WebWindows(0).PageWindow("Zinfandel.htm")
![Page 192: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/192.jpg)
UsingthePageWindowobject
UsePageWindows(index),whereindexistheindexnumberofapagewindowitem,toreturnasinglePageWindowExobject.ThefollowingstatementreturnsthefileURLofthefirstpagewindowiteminthePageWindowscollection.
PgePageOne=WebWindows(0).PageWindows(0).Document.Url
UsetheActiveFrameWindowpropertytoreturntheactiveframeofaPageWindowExobject.ThefollowingstatementreturnstheActiveFrameWindowobject.
NoteTheactiveframeistheframethatcurrentlyhasthefocus;itisshowninFrontPagewithabluebordersurroundingit.
SetobjActiveFrame_
=WebWindows(1).ActivePageWindow.ActiveFrameWindow
UsetheFrameWindowpropertytoreturnanFPHTMLWindow2object,whichcanthenbeusedtoreturntheframescollectionandthecontentofeachoftheframescollectionpages.
objFrameWindow=WebWindows(0).ActivePageWindow.FrameWindow
UsetheDocumentpropertytoreturnthedocumentassociatedwiththePageWindowExobject.ThefollowingstatementreturnsthedocumentassociatedwiththefirstPageWindowExobjectofthefirstWebWindowExobject.
SetobjDoc=WebWindows(0).PageWindows(0).Document
YoucanusetheIsDirtypropertytodetermineifthePageWindowExobjectisdirty—thatis,ifithasbeenmodifiedsincethelastrefreshorsave.TheisDirtypropertyreturnsTrueifthePageWindowExobjectisdirty.ThefollowingexamplesavesthePageWindowExobjectifthefirstiteminthePageWindowscollectionisdirty.
PrivateSubCheckPageWindowIsDirty()
DimobjPageWinAsPageWindowEx
![Page 193: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/193.jpg)
SetobjPageWin=WebWindows(0).PageWindows(0)
IfobjPageWin.IsDirty=TrueThen
objPageWin.Save
EndIf
EndSub
YoucanusetheViewModepropertytosettheviewforthepageasshowninthefollowingstatement.Formoreinformationontheenumeratedconstantsavailableforthisproperty,seethetableundertheViewModeproperty.
WebWindows(1).PageWindows(1).ViewMode=fpPageViewHtml
![Page 194: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/194.jpg)
SurveyObjectSurvey Multipleobjects
ContainsinformationabouttheMicrosoftFrontPageSurveyobjectthatallowsuserstovoteonissuesandshareinformation.
ThisobjectissupportedonlybyWebpagesorsitesthatarebasedonMicrosoftSharePointServices.
![Page 195: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/195.jpg)
UsingtheSurveyobject
UseLists.Item(index),whereindexisisthenameorordinalpositionofaListobjectoftypefpListTypeSurvey,toreturnasingleSurveyobject.
ThefollowingexampleliststhenamesofallsurveysintheactiveWebsite.IftheWebsitecontainsnosurveysortheWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubListAllSurveys()
'Displaysthenamesofallsurveyobjectsinthecollection
DimlstWebListAsList
DimstrNameAsString
DimblnFoundAsBoolean
'Setfoundflagtofalse
blnFound=False
'Checkifanylistsexist
IfNotActiveWeb.ListsIsNothingThen
'Cyclethroughlists
ForEachlstWebListInActiveWeb.Lists
IflstWebList.Type=fpListTypeSurveyThen
'Setboolenflagtofound
blnFound=True
'addlistnamestostring
IfstrName=""Then
strName=lstWebList.Name&vbCr
Else
strName=strName&lstWebList.Name&vbCr
EndIf
EndIf
Next
IfblnFound=TrueThen
'Displaynamesofallsurveyobjects
MsgBox"ThenamesofallsurveyobjectsinthecurrentWebsiteare:"_
&vbCr&strName
Else
MsgBox"TherearenosurveyobjectsinthecurrentWebsite."
EndIf
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
![Page 196: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/196.jpg)
EndSub
UsetheListscollection'sAddmethodtocreateanewlistoftypefpListTypeSurvey.ThefollowingexamplecreatesanewsurveycalledNewSurvey.
SubNewSurvey()
'AddsanewSurveytothecurrentWebsite
DimobjAppAsFrontPage.Application
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewsurvey
objLists.AddName:="NewSurvey",_
ListType:=fpListTypeSurvey,_
Description:="NewSurvey"
'Displaymessagetouser
MsgBox"AnewsurveywasaddedtotheListscollection."
EndSub
![Page 197: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/197.jpg)
SystemObjectApplication System
Providesaccesstosysteminformationsuchastheoperatingsystem,screenresolution,orregistry.
![Page 198: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/198.jpg)
UsingtheSystemObject
UsetheSystempropertytoreturntheSystemobject.Thefollowingstatementreturnsthenameofthecallingapplication.
mySysApp=System.Application.Name
UsetheBuildandVersionpropertiestoreturnbuildandversioninformationabouttheoperatingsystem.
myVer=System.Version
myBld=System.Build
Thehorizontalandverticalresolutioncanbeusedtodetermineifagraphiccanbedisplayedonaclient’smachine.Thefollowingstatementsreturntheresolutionsettings.
currHorizRes=System.HorizontalResolution
currVertRes=System.Vertical.Resolution
UsetheOperatingSystempropertytoreturnthenameofthecurrentoperatingsystem,asshowninthefollowingstatement.
thisOps=System.OperatingSystem
UsetheParentpropertytoreturntheparentofthespecifiedobject.ThefollowingstatementreturnsparentinformationfortheSystemobject.
PrivateSubGetSystemParentInfo()
DimmySysAsSystem
DimmySysUserNameAsString
SetmySys=System
WithmySys
mySysUserName=.Parent.UserName
EndWith
EndSub
![Page 199: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/199.jpg)
UsetheLanguageDesignationpropertytoreturnathree-letterabbreviationforthelanguageusedfortheoperatingsystem.Thefollowingstatementreturns"enu"asthelanguagedesignationabbreviationfortheEnglish(US)language.
currSystemLanguage=System.LanguageDesignation
UsetheProfileStringpropertytoreturnorsetanentryintheWindowsregistry.Ifusedwithoutparameters,theProfileStringpropertydefaultstothefollowingkey:
HKEY_CURRENT_USERS\Software\Microsoft\FrontPage
TheparametersfortheProfileStringpropertyare:
RegistrySection,whereRegistrySectionisaregistrysubtreesuchasHKEY_CURRENT_USERorHKEY_LOCAL_MACHINE.RegistryKey,whereRegistryKeyisthenextlevelbelowthesectionorsubtreewithsuchkeynamesasSoftwareorNetwork.
ThefollowingexamplereturnstheIdentifierfortheCentralProcessorsubkey.
PrivateSubGetProfileString()
DimmySysAsSystem
DimmyRegSecAsString
DimmyRegKeyInfoAsString
SetmySys=System
myRegSec=_
"HKEY_LOCAL_MACHINE\Hardware\Description\System\CentralProcessor\0"
myRegKeyInfo=mySys.ProfileString(myRegSec,"Identifier")
EndSub
![Page 200: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/200.jpg)
ThemeObjectMultipleobjects Themes
Theme
RepresentsathemeinMicrosoftFrontPage.TheThemeobjectisamemberoftheThemescollection.TheThemescollectionrepresentsallthethemesonthelocalmachineorallthemesappliedtoaspecificWebsite.WithintheThemescollection,individualThemeobjectsareindexedbeginningwithzero.
![Page 201: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/201.jpg)
UsingtheThemeobject
UsetheFormatpropertytoreturnformatinformationforatheme.ThefollowingstatementreturnstheformatforthefirstthemeappliedtotheactiveWebsite.
myThemeFormat=ActiveWeb.Themes(1).Format
UsetheLabelpropertytoreturnthenamethatisdisplayedintheThemelistbox.Thisisthefullnameofthetheme.Thefollowingstatementreturnsthelabelforthetheme.
myThemeLbl=ActiveWeb.Themes(1).Label
UsetheNamepropertytoreturnorapplyathemetoaWebpage.TheNamepropertycontainsthedirectorynameforthetheme,whichisanabbreviatedversionofthenameofthethemeasdisplayedintheThemelistbox.Thefollowingexampleliststhenamesofallthemesinthethemescollectioninthebodyoftheactivedocument.
NoteTorunthisexample,youmusthaveaWebsiteopenthathasathemeappliedtotheactivepage,theentireWebsite,oraspecificfileintheWebsite.
SubListThemes()
DimobjThemeAsTheme
ForEachobjThemeInApplication.Themes
ActiveDocument.body.insertAdjacentText"beforeend",objTheme.Name
Next
EndSub
UsetheVersionpropertytoreturntheversionnumberofthetheme.Thefollowingexamplereturnstheversionforatheme.
myThemeVersion=Theme.Version
![Page 202: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/202.jpg)
![Page 203: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/203.jpg)
WebExObjectMultipleobjects Web
Multipleobjects
RepresentsaMicrosoftFrontPageWebsite.TheWebExobjectisamemberoftheWebscollection,whichrepresentsalloftheopenWebsitesinFrontPage.FrontPageprovidestheabilitytocreatemultipleWebExobjectsonaWebserver.WithintheWebscollection,individualWebExobjectsareindexedbeginningwithzero.ThedirectoryhierarchyofaWebsiteinFrontPageissimilartoafolderhierarchy.AnyWebFoldercanrepresentaWebsite,buteveryWebFolderdoesnotnecessarilyrepresentaWebsite.TheWebfolderhierarchyprovidesthelinktofoldersandfilesonaWebserverdirectory.
![Page 204: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/204.jpg)
UsingtheWebobjectproperties
UsetheWebpropertytoreturntheWebExobject.ThefollowingexamplecheckstheWebsite’soperatingsystemforthecapabilityofprocessinglongfilenames.
NoteTorunthisexample,createaformwithacommandbuttoncalledcmdCheckLongFilenames,atextboxcalledtxtLongFilenames,andcopytheexampleintothecodewindow.
PrivateSubcmdCheckLongFilenames()
DimobjPageWinAsPageWindow
SetobjPageWin=ActivePageWindow
WithobjPageWin
If.Web.AllowsLongFilenames=TrueThen
txtlongFilenames=_
"Thisoperatingsystemuseslongfilenames."
ExitSub
Else
txtlongFilenames=_
"Thisoperatingsystemonlyusesshortfilenames."
EndIf
EndWith
EndSub
UseWebs(index),whereindexistheordinalpositionofaWebsiteintheWebscollection,toreturnasingleWebExobject.ThefollowingexamplereturnstheURLofthefirstWebsiteintheWebscollection.
Application.Webs(0).Url
UsetheActiveWebWindowpropertytoreturntheselectedWebWindowExobject.FromtheWebWindowExobject,youcanaccesstheActiveDocument,ActivePageWindow,orApplicationproperties,alongwithpropertiessuchasCaption,PageWindows,Parent,ViewMode,Visible,andWeb.Thefollowingexamplereturnsthecreationdateandfilesizeoftheactivedocument.
![Page 205: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/205.jpg)
NoteAlthoughDateisanavailabletypeinMicrosoftVisualBasicforApplications(VBA),theWebWindowExobjectreturnsthedateinstringformatanddoesnotautomaticallyconvertthestringtoadateformat.
PrivateSubActiveDocDateSize()
DimobjWebWindowAsWebWindowEx
DimstrFileSizeAsString
DimstrCreateDateAsString
SetobjWebWindow=ActiveWebWindow
WithobjWebWindow
strFileSize=.ActiveDocument.fileSize
strCreateDate=.ActiveDocument.fileCreatedDate
EndWith
EndSub
TheRevisionControlProjectandIsUnderRevisionControlpropertiesreturnthestatusoftheWebExobject’srevisionstate.YoucancontrolversioninginMicrosoftFrontPagethroughMicrosoftVisualSourceSafeorthroughMicrosoftOffice-stylelocking.FormoreinformationonsourcecontrolprojectsandOffice-stylelocking,seeManagingSourceControl.
IfarevisioncontrolprojectdoesnotcorrespondtoavalidVisualSourceSafeproject,FrontPagedefaultstoOffice-stylelocking.ThefollowingexamplereturnstheRevisionControlProjectandIsUnderRevisionControlproperties,andincludesasourcecontrolprojectexample.
NoteTorunthisexample,createamoduleandcopytheexampleintothecodewindow.YoumusthaveaWebsiteopen.
PrivateSubSourceControl()
DimobjWebAsWebEx
SetobjWeb=ActiveWeb
IfNot(objWeb.IsUnderRevisionControl)Then
objWeb.RevisionControlProject="<FrontPage-basedLocking>"
EndIf
EndSub
PrivateSubReturnRevisionState()
DimobjWebAsWebEx
DimstrRevCtrlProjAsString
![Page 206: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/206.jpg)
DimblnIsUnderRevCtrlAsBoolean
SetobjWeb=ActiveWeb
WithobjWeb
RevCtrlProj=.RevisionControlProject
blnIsUnderRevCtrl=.IsUnderRevisionControl
EndWith
EndSub
UsetheRootFolderandRootNavigationNodepropertiestodeterminetherootfolderorrootnavigationnode.TheRootFolderpropertyreturnsapointertotherootfolderofaWebsite.TheRootNavigationNodepropertyreturnstheNavigationNodeobjectfromwhichyoucanaccessallothernavigationnodesinaWebsite.TheRootNavigationNodeobjectiscreatedbydefaultwhenyoucreateaWebsite,andprovidesthebasisforthenavigationstructure,whichisaccessedthroughtheChildrenproperty.ThefirstchildnodeofthenavigationstructureisthehomepageoftheWebsite.ThefollowingexamplereturnsthenameoftherootfolderandtheURLoftheRootNavigationNodeobject.
PrivateSubGetRootInfo()
DimobjWebAsWebEx
DimstrRootFolderAsString
DimstrHomeNavNodeAsString
SetobjWeb=ActiveWeb
WithobjWeb
strRootFolder=.RootFolder.Name
strHomeNavNode=.RootNavigationNode.Children(0).Url
EndWith
EndSub
UsetheSharedBorderspropertytosetthesharedbordersforaWebsiteeitheronoroff.ThefollowingstatementsetstheSharedBorderspropertytoTrueandturnssharedbordersonforthespecifiedWebsite.
ActiveWeb.SharedBorders(fpBorderTop)=True
UsetheWebWindowspropertytoreturnthecollectionofWebWindowobjectsthatarecontainedwithinthecurrentWebExobject.ThefollowingstatementreturnsacountoftheWebWindowscollection.
![Page 207: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/207.jpg)
Application.WebWindows.Count
![Page 208: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/208.jpg)
UsingtheWebobjectmethods
UsetheActivatemethodtoplacethefocusonthecurrentobject.ThefollowingstatementscheckifmyAdventureWorksWebistheactiveWebsite;ifitisnot,thenmyAdventureWorksWebisactivated.
IfActiveWeb<>myAdventureWorksWebThen
objAdventureWorksWeb.Activate
EndIf
UsetheApplyNavigationStructuremethodtoapplyanewlycreatedormodifiednavigationstructuretoaWebsite.ThefollowingstatementappliesanavigationstructuretoaWebsite,wherethevariablefortheAdventureWorksWebsiteiswebAdventureWorksWeb.
myAdventureWorksWeb.ApplyNavigationStructure
UsetheCancelRequestsmethodtocancelallserverrequests.ThefollowingstatementcancelsallserverrequestsfortheAdventureWorksWebsite,withwebAdventureWorksWebastheWebobjectvariable.
NoteTheclientwillstopallrequeststotheserver;however,theservermayhavealreadystartedatransaction,inwhichcaseitwillcontinueuntilthetransactionisfinishedandthentheremainingrequests(ifany)willbecancelled.
myAdventureWorksWeb.CancelRequests
UsetheLocateFileorLocateFoldermethodstoreturnaWebFileoraWebFolderobjectwithinaWebsite.Thefollowingexamplelocatesafolderforadisk-basedWebsite.
Application.Web.LocateFolder("C:\MyWebSites\AdventureWorks\images")
UsethePublishmethodtopublishaWebsitetoaWebserver.ThefollowingstatementpublishestheAdventureWorksWebsitetoaPersonalWebServersite.
![Page 209: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/209.jpg)
DimobjWebAsWebEx
SetobjWeb=Application.Web
WithobjWeb
.Publish_
"http://myServer/wwwroot",fpPublishAddToExistingWeb
TheFpWebPublishFlagsenumeratedtypescanbeconcatenatedasshowninthefollowingstatement.
myWeb.Publish_
"http://myServer/wwwroot",fpPublishAddToExistingWeb+_
fpPublishCopySubwebs
![Page 210: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/210.jpg)
WebFileObjectMultipleobjects WebFile
Multipleobjects
RepresentsafileinaMicrosoftFrontPage-basedWebsite.TheWebFileobjectisamemberoftheWebFilescollection.TheWebFilescollectionrepresentsallofthefilesinaspecifiedWebFolderobject.WithintheWebFilescollection,individualWebFileobjectsareindexedbeginningwithzero.TheWebFileobjectissimilartoafileinadirectory-basedhierarchy.FrontPageprovidestheabilitytocreatemultipleWebobjectsonaWebserver.AnyWebFoldercanrepresentaWebsite,buteveryWebFolderdoesnotnecessarilyrepresentaWebsite.
![Page 211: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/211.jpg)
UsingtheFileobject
UseWebFiles(index),whereindexistheordinalnumberofaWebpage,toreturnasingleWebFileobject.ThefollowingexamplereturnsthefilenameofthefirstWebpageintheWebFilescollection.
ActiveWeb.RootFolder.Files(0).Name
UsetheFileobjecttoreturninformationaboutafileonaWebsite.ThefollowingexamplereturnstheName,Title,andUrlpropertiesofeachFileobjectontheactiveWebsite.
NoteTorunthisprogram,youmusthavealeastoneWebsiteopen.
PrivateSubGetWebFileInfo()
DimmyWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyFileNameAsString
DimmyTitleAsString
DimmyUrlAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
myFileName=myFile.Name
myTitle=myFile.Title
myUrl=myFile.Url
Next
EndWith
EndSub
UsetheIsOpenpropertytocheckifafileiscurrentlyopeninPageview.ThefollowingexamplereturnstheIsOpenpropertyforaspecifiedFileobject.NoticethattheEditmethodisusedtoopenthefileinthisexample.Formoreinformationonusingthesemethods,seetheEditmethod.
NoteYoumusthaveaWebsiteopentorunthisprogram.
![Page 212: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/212.jpg)
PrivateSubCheckForOpenFile()
DimmyWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyFileToOpenAsString
DimmyMessageAsString
DimmyFileNameAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
myFileToOpen="index.htm"
myMessage="Thisfileiscurrentlyopen."
WithmyWeb
ForEachmyFileInmyFiles
myFileName=myFile.Name
IfmyFileName=myFileToOpenThen
IfmyFile.IsOpen=TrueThen
MsgBox(myMessage)
ExitSub
Else
myFile.EditfpPageViewNormal
ExitSub
EndIf
EndIf
Next
EndWith
EndSub
UsetheCheckin,Checkout,andUndoCheckoutmethodstomanagefileresourcesthroughsourcecontrolonaWebsite.ThefollowingstatementchecksoutthefirstfileintheactiveWebsite.
NoteYoumusthaveasourcecontrolprojectsetupinorderforthistowork.
myFileCheckedOut=ActiveWeb.RootFolder.Files(1).Checkout
SimilartofilemanagementfeaturesinMicrosoftVisualSourceSafe,FrontPagealsoprovidesanUndoCheckoutmethodthatyoucanusetoreturnafiletoitsoriginalstate.Thefollowingstatementreturnsthefiletoitsoriginalstate.
myFileCheckedOut=ActiveWeb.RootFolder.Files(1).UndoCheckout
![Page 213: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/213.jpg)
YoucanusetheCheckedoutBypropertybeforeattemptingtocheckoutafiletoseeifthefileiscurrentlycheckedoutandbywhom.Thefollowingstatementreturnsthelogonaliasofthepersonwhocheckedoutafileorisnullifthefileisn'tcurrentlycheckedout.
myWhoCheckedOutFile=ActiveWeb.RootFolder.Files(0).CheckedoutBy
UsethePropertiespropertytoreturninformationaboutaWebsite,suchasthetypeofWebserver(vti_webservertype)oriftheWebsitehasasearchbot(vti_hassearchbot).ThePropertiespropertyreturnsacollectionofkey-valuepairsusedtomaintainthemetainformation.ThefollowingstatementreturnsTrueforthevariablemySearchBotiftheWebsitehasasearchbot.
mySearchBot=ActiveWeb.Properties.Item("vti_hassearchbot")
UsetheMetaTagspropertytoreturninformationaboutthemetatagscontainedintheHTMLcodingofafile.TheMetaTagspropertyreturnsacollectionofmetatagsforaFileobject,suchasthegeneratorofthefile.ThefollowingexamplereturnsthefilenameandmetatagsforeachfileinaWebsite.
NoteTorunthisprogram,youmusthavealeastoneWebsiteopen.
PrivateSubGetMetaTags()
DimmyWebAsWebEx
DimmyMetaTagAsVariant
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyMetaTagsAsMetaTags
DimmyFileNameAsString
DimmyMetaTagNameAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
SetmyMetaTags=myFile.MetaTags
ForEachmyMetaTagInmyMetaTags
myFileName=myFile.Name
myMetaTagName=myMetaTag
Next
Next
EndWith
![Page 214: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/214.jpg)
EndSub
UsetheSharedBorderspropertytoreturnthesharedbordersonthecurrentWebpageortosetnewsharedborders.ThefollowingstatementreturnsthetopsharedborderofthefirstfileintheFilescollectionoftheactiveWebsite.
myTopBorder_
=ActiveWeb.RootFolder.Files(0).SharedBorders(fpBorderTop)
YoucanalsosetsharedbordersonaWebpage,asshowninthefollowingstatement.
ActiveWeb.RootFolder.Files(0).SharedBorders(fpBorderTop)=True
UsetheThemePropertiespropertytoreturninformationaboutwhetherthethemeusesvividcolorsoractivegraphics.Thefollowingexamplereturnsthepropertiesofanappliedthemeandaddsvividcolorstothecurrentthemepropertiesifvividcolorshaven'tbeenappliedtothespecifiedobject.
PrivateSubCheckThemeProperties()
DimmyFileAsWebFile
SetmyFile=ActiveWeb.RootFolder.Files(0)
IfmyFile.ThemeProperties(fpThemeActiveGraphics)Then
myFile.ApplyThememyFile.ThemeProperties(fpThemeName),myFile.ThemeProperties(fpThemePropertiesAll)
Else
myFile.ApplyThememyFile.ThemeProperties(fpThemeName),myFile.ThemeProperties(fpThemePropertiesAll)+fpThemeActiveGraphics+fpThemeVividColors
EndIf
EndSub
![Page 215: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/215.jpg)
UsingFilemethods
UsetheCopy,Delete,Edit,Move,orOpenmethodstomanageyourWebpages.There'sasubtledistinctionbetweentheEditandOpenmethods.WiththeEditmethod,youcanopenandmodifyaFrontPage-compatiblefileintoaPageWindowobject.WiththeOpenmethod,youcanopenbothFrontPage-compatiblefilesandanyothertypeoffilesuchasimageortextfiles,intothefile'sassociatededitor.WhenyouusetheOpenmethodtoopenafiletypethatisnotFrontPage-compatible,FrontPagedoesnotreturnafileobject.Thefollowingexampleopensafile,deletesafile,andmovesafile.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebsSites\CohoWinery".
PrivateSubOpenFile()
DimmyWebAsWebEx
DimmyFileAsWebFile
SetmyWeb=Webs.Open("C:\MyDocuments\MyWebsSites\CohoWinery")
myWeb.Activate
SetmyFile=myWeb.RootFolder.Files("index.htm")
myFile.Open
EndSub
PrivateSubDeleteFile()
DimmyWebAsWebEx
DimmyFileAsWebFile
SetmyWeb=ActiveWeb
SetmyFile=myWeb.RootFolder.Files(0)
myFile.Delete
EndSub
SubMoveFile()
DimmyWebAsWebEx
DimmyFileAsWebFile
SetmyWeb=ActiveWeb
SetmyFile=myWeb.RootFolder.Files(0)
myFile.Move"NewFilename",True,True
EndSub
![Page 216: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/216.jpg)
![Page 217: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/217.jpg)
WebFolderObjectMultipleobjects WebFolder
Multipleobjects
RepresentsafolderinaMicrosoftFrontPage-basedWebsite.TheWebFolderobjectisamemberoftheWebFolderscollection.
NoteTheFolderobjectisapointertotheWebFolderobject.
TheWebFolderscollectionrepresentsallofthefoldersinaspecifiedWebsite.WithintheWebFolderscollection,individualWebFolderobjectsareindexedbeginningwithzero.TheWebFolderobjectissimilartoafolderinadirectory-basedhierarchy;however,therelationshipbetweenWebFolderobjectsandWebobjectsisunique.FrontPageprovidestheabilitytocreatemultipleWebExobjectsonaWebserver.AnyWebFoldercanrepresentaWebsite,buteveryWebFolderdoesnotnecessarilyrepresentaWebsite.ThefolderhierarchyprovidesthelinktofoldersandfilesonaWebserverdirectory.ThenavigationstructureprovidestheunderlyingstructurefortheWebobjectswithinindividualFrontPage-basedWebsites.
![Page 218: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/218.jpg)
UsingtheWebFolderobject
UseWebFolders(index),whereindexisthepropertykeyofafolder,toreturnasingleWebFolderobject.ThefollowingexamplereturnsthefilenameofthefirstfolderitemintheWebFolderscollection.
ActiveDocument.WebFolders(0).Name
UsethecollectionpropertiessuchasFiles,Folders,orProperties,toreturnthecollectionobjectforthespecifieditem.ThefollowingstatementsreturnthefirstspecifiediteminthecollectionfortheactiveWebsite.
myFileOne=ActiveWeb.RootFolder.Files(0)
myFolderOne=ActiveWeb.RootFolder.Folders(0)
myPropertyOne=ActiveWeb.Properties("vti_author")
UsesuchpropertiesasIsExecutable,IsReadable,IsRoot,andsoon,tocheckforthespecifiedstateofthefolder.IfyouhaveCGIscriptsthatyou'dliketoexecute,youcanaddthescriptstoafolderandsettheIsExecutablepropertyofthatfoldertoTrue.Whenyouhavecontentinafolderthatyou'dlikeotherstobrowse,youcansettheIsReadablepropertytoTrue.Ifyouwanttocheckwhetherthecurrentfolderistherootfolder,youcanusetheIsRootproperty.ThefollowingexamplechecksiffilesinthecurrentWebFolderobjectareexecutable,read-only,orlocatedinarootfolder.
PrivateSubGetFolderInfo()
DimmyWebAsWebEx
DimmyFolderAsWebFolder
DimmyIsExeAsBoolean
DimmyIsReadableAsBoolean
DimmyIsRootAsBoolean
SetmyWeb=ActiveWeb
SetmyFolder=myWeb.RootFolder.Folders(1)
WithmyFolder
myIsExe=.IsExecutable
myIsReadable=.IsReadable
myIsRoot=.IsRoot
EndWith
EndSub
![Page 219: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/219.jpg)
TheIsExecutable,IsReadable,andIsWriteablepropertiesreturninformationaboutthestateofthefolder.ThefollowingexamplesshowhowtosettheIsExecutableandIsReadablepropertiesandreadtheIsWriteableproperty.
NoteYoucannotsettheIsWriteableproperty,howeveryoucansettheIsExecutableandIsReadablepropertiesforaWebFolderobject.
SubFolderProperties()
DimmyFolderAsWebFolder
SetmyFolder=ActiveWeb.RootFolder.Folders(0)
IfmyFolder.IsWritableThen
MsgBox"Folder,"&myFolder.Url&"iswritable"
EndIf
IfNot(myFolder.IsReadable)Then
MyFolder.IsReadable=True
EndIf
IfmyFolder.IsExecutableThen
MyFolder.IsExecutable=False
EndIf
EndSub
Folders(orWebFolderscollection)inFrontPageservetwopurposes.TheycanbefoldersthathelpmanagethecontentsofaWebsiteortheycanbeentireWebsites.AWebsitecanhavemultiplesubWebsitesbelowit.TheIsWebpropertyreturnsTrueifthefolderinquestionisaWebsubsite.ThefollowingexampleusestheIsWebpropertytodetermineifafolderisaWebsubsiteand,ifso,openstheWebsite.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\CohoWinery",oryoumaysubstituteanalternativeWebsiteURL.
PrivateSubCheckFolder()
DimmyFolderAsWebFolder
SetmyFolder=ActiveWeb.RootFolder.Folders("CohoWinery")
IfmyFolder.IsWeb=TrueThen
Webs.OpenmyFolder.Url
EndIf
EndSub
![Page 220: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/220.jpg)
UsetheUrlpropertytoreturntheURLofthecurrentWebFolderobject.ThefollowingstatementreturnstheabsoluteURLfortheeighthfolderintheactiveWebsite.
myUrl=ActiveWeb.RootFolder.Folders(7).Url
UsetheCopy,Delete,andMovemethodstomaintainyourWebsitestructure.ThefollowingstatementcopiesaWebFolderobjectfromonefoldertoanotherfolder,updatesthelinksduringthecopyprocess,andforcesanoverwriteifthefilealreadyexists.
myFolder.Copy("C:\MyWebSites\NewAdventureProducts",True,True)
![Page 221: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/221.jpg)
WebPackageObjectWebPackage
RepresentsaWebpackagethathasbeencreatedinMicrosoftFrontPageVisualBasicforApplications.TheWebPackageobjectisanin-memoryobjectonlyanddoesnotcorrespondtoanyFrontPageUserInterfaceelement.Instead,usetheWebPackageobjecttoworkwithaWebpackageonceyou'vecreateditincode.
![Page 222: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/222.jpg)
UsingtheWebPackageobject
UsetheCreatePackagemethodtocreateaWebPackageobject.ThefollowingexamplecreatesanewWebpackage.
DimobjPackageAsWebPackage
SetobjPackage=ActiveWeb.CreatePackage("NewWebPackage")
UsetheAddmethodtoaddfilestotheWebpackage.ThefollowingexampleaddsthreefilestotheWebPackageobjectcreatedinthepreviouscode.
objPackage.AddobjWeb.Url&"/test.htm",fpDepsDefault
objPackage.AddobjWeb.Url&"/test2.htm",fpDepsNone
objPackage.AddobjWeb.Url&"/test3.htm",fpDepsImages
UsetheSubject,Author,Comany,andTitlepropertiestoaddinformationaboutaWebpackage.Thefollowingexamplespecifiesthesubject,author,andcompanyfortheWebPackageobjectcreatedabove.(WhenyoucreateaWebpackage,theTitleparameterfortheCreatePackagemethodbecomesthevalueoftheTitleproperty.YoucanchangethetitleofaWebpackagebysettingtheTitlepropertytoanewvalue.)
objPackage.Author="JohnSmith"
objPackage.Company="FourthCoffee"
objPackage.Subject="ThisisanewWebpackageforFourthCoffee."
UsetheRemovemethodtoremovefilesthatwereaddedbyusingtheAddmethod.Thefollowingexampleremovesoneofthefilesaddedabove.
objPackage.RemoveobjWeb.Url&"/test3.htm",fpDepsImages
UsetheSavemethodtosave,orexport,aWebpackage.ThefollowingexamplesavestheWebPackageobjectcreatedabove.
objPackage.Save"c:\NewWebPackage.fwp",True
![Page 223: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/223.jpg)
![Page 224: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/224.jpg)
WebWindowExObject
WebWindowEx Multipleobjects
RepresentsaMicrosoftFrontPageapplicationwindowinwhichaWebsiteisopened.TheWebWindowExobjectisamemberoftheWebWindowscollection.TheWebWindowscollectionrepresentsalloftheopenapplicationwindowsinaspecifiedWebsiteorwithinFrontPage.WithintheWebWindowscollection,individualWebWindowExobjectsareindexedbeginningwithzero.EachWebsitethatisopenedinFrontPageiscontainedinanewWebWindowExobject,unlessitisopenedinawindowlessenvironmentbysettingtheVisiblepropertyoftheWebWindowExobjecttoFalse.Formoreinformationonwindowlessenvironments,seeCodinginaWindowlessEnvironment.
![Page 225: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/225.jpg)
UsingtheWebWindowobject
UsetheWebWindowpropertytoreturninformationaboutanopenWebWindowExobject.YoucanalsousethePageWindowspropertytoreturninformationaboutthecollectionofopenpagesinaWebWindowExobject.UseWebWindows(index),whereindexistheindexnumberofanapplicationwindowitem,toreturnasingleWebWindowobject.ThefollowingstatementreturnstheViewModepropertyofthefirstWebsiteintheWebWindowscollection.
myViewMode=WebWindows(0).ViewMode
YoucanalsousetheViewModepropertytoswitchbetweenviewmodesbysettingtheviewmodeasshowninthefollowingstatement,whichswitchesthecurrentviewmodetoNavigationview.
ActiveWebWindow.ViewMode=fpWebViewStructure
TheActivatemethodputsthefocusonthespecifiedWebWindowExobject.ThefollowingstatementsactivatesthefirstWebsitesinthecollectionofopenwindows.
myWebWindow=WebWindows(0)
myWebWindow.Activate
TheActivePageWindowpropertyreturnstheactivePageWindowExobject.ThefollowingstatementsreturntheURLandthecaptionoftheactivePageWindowExobject.Thevaluereturnedforthecaptioninthiscaseisafilename,suchas"Index.htm".
urlThisDoc=WebWindow.ActivePageWindow.Document.Url
fileName=WebWindow.ActivePageWindow.Caption
YoucanalsoreturntheCaptionpropertyfromtheWebWindowExobject.Inthiscase,thetextthatisreturnedreflectsthetextinthetitlebaroftheFrontPageapplicationwindow,whichconsistsoftheapplicationnameandtheURLofthe
![Page 226: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/226.jpg)
specifiedWebWindowExobject,suchas"MicrosoftFrontPage–C:\MyDocuments\MyWebSites\AdventureWorks".ThefollowingstatementreturnsthevalueoftheCaptionpropertyoftheWebWindowExobject.
thisCaption=WebWindow.Caption
UsetheClosemethodtocloseaWebWindowExobject.ThefollowingstatementclosesthespecifiedWebWindow.
SetmyWebWindowOne=WebWindows(0)
myWebWindowOne.Close
UsetheViewModepropertytoreturnorsetoneofthevaluesshowninthefollowingtable.YoucanalsousetheseenumeratedvaluestoswitchviewsinFrontPage.
EnumermatedConstant Value CorrespondingViewinFrontPageFpWebViewLinks 0 HyperlinksviewFpWebViewFolders 1 FoldersviewFpWebViewStructure 2 NavigationviewFpWebViewPage 3 PageviewfpWebViewAllFiles 4 ViewalistofeveryfileinReportsviewFpWebViewTodo 5 ViewaToDolistinTasksview
FpWebViewBrokenLinks 6 ViewalistofbrokenhyperlinksinReportsview
FpWebFiewSiteSummary 7 SiteSummaryviewinReportsview
ThefollowingstatementsetstheViewModepropertytofpWebViewPage.
WebWindows(0).ViewMode=fpWebViewPage
UsetheVisiblepropertytoreturnorsetaBooleanvalueforthestateofaWebWindowExobject.TheVisiblepropertyreturnsTrueifaWebWindowExobjectisvisible.ThefollowingstatementsetsaWebWindowExobjecttoaninvisiblestate.
![Page 227: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/227.jpg)
WebWindow.Visible=False
UsetheWebpropertytoreturninformationabouttheWebExobject.ThefollowingstatementreturnsthenumberofpropertiesforthespecifiedWebsites.
myProperties=ActiveWeb.WebWindows(0).Web.Properties.Count
![Page 228: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/228.jpg)
ActivateMethodActivatesthespecifiedPageWindowEx,WebEx,orWebWindowExobject.Whenyouhavemultipleobjectsopen,youcanusetheActivatemethodtoworkwithaspecificPageWindowEx,WebEx,orWebWindowExobject.
expression.Activate
expressionAnexpressionthatreturnsaPageWindowEx,WebEx,orWebWindowExobject.
![Page 229: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/229.jpg)
Remarks
TheActivatemethodhasnoeffectonawindowlessPageWindowExobject.
![Page 230: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/230.jpg)
Example
ThisstatementactivatesthehomepagefortheAdventureWorksWebsite.
IfmyWeb.Url="C:\MyWebSites\AdventureWorks"ThenmyWeb.Activate
![Page 231: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/231.jpg)
ShowAll
![Page 232: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/232.jpg)
AddMethodAddmethodasitappliestotheListFieldsobject.
AddsanewListFieldobjecttotheListFieldscollection.
expression.Add(Name,Description,FieldType,Required,DefaultValue)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
NameRequired.AStringthatrepresentsthenameofthefield.
DescriptionOptional.AStringthatrepresentsadescriptionofthefield.
DefaultValueOptional.AVariantthatdefinesthedefaultvalue.
FieldTypeOptional.AnFpFieldTypeconstantthatrepresentsthetypeofthenewfield.
FpFieldTypecanbeoneoftheseFpFieldTypeconstants.fpFieldAttachmentsfpFieldChoicefpFieldComputedfpFieldCounterfpFieldCurrencyfpFieldDateTimefpFieldFilefpFieldIntegerfpFieldLookupfpFieldMultiLinefpFieldNumberfpFieldRatingScalefpFieldSingleLinedefaultfpFieldTrueFalse
![Page 233: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/233.jpg)
fpFieldURL
RequiredOptional.ABooleanthatdeterminesifthisisarequiredfield.Trueifthefieldisrequired.
AddmethodasitappliestotheListsobject.
AddsanewListobjecttotheListscollection.
expression.Add(Name,ParentFolder,ListType,Description)
expressionRequired.AnexpressionthatreturnsaListsobject.
NameRequired.AStringthatrepresentsthenameofthenewlist.
ParentFolderOptional.AStringthatrepresentstheparentfolderassociatedwiththeList.
ListTypeOptional.AnFpListTypeconstantthatrepresentsthetypeoflist.
FpListTypecanbeoneoftheseFpListTypeconstants.fpListTypeBasicListdefaultfpListTypeDiscussionfpListTypeDocumentLibraryfpListTypeSurvey
DescriptionOptional.AStringthatrepresentsadescriptionoftheListobject.
AddmethodasitappliestotheNavigationNodesobject.
AddsanewfiletothelistofavailableitemsintheNavigationNodescollection.Usethismethodtoaddanewfiletothenavigationstructure.Formoreinformationonusingnavigationnodes,seetheRootNavigationNodepropertyfortheWebobject,ortheChildrenpropertyfortheNavigationNodeobject.
expression.Add(Url,NodeLabel,ModificationType,LeftSibling)
expressionRequired.AnexpressionthatreturnsaNavigationNodescollection.
![Page 234: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/234.jpg)
UrlRequiredString.AstringthatcontainsthepathfortheWebserverwherethefilewillbestored.ThiscanbeanyabsoluteURL,suchashttp://webserverorfile://filesystemfordisk-basedWebs.
NodeLabelRequiredString.AstringoftextusedtoidentifytheNavigationNodeobjectwhenviewingthenavigationstructureinNavigationview.TheNodeLabelargumentisusedonlyasanaidtoidentification.
ModificationTypeRequiredFpStructModType.Thenodemodificationtype.
FpStructModTypecanbeoneoftheseFpStructModTypeconstants.fpStructBaseOnSiblingUsethissettingifyouwanttoaddanewnodetotherightofthenodedesignatedintheleftsiblingargument.fpStructLeftmostChildTheleftmostnodeinthecurrentnavigationstructure.fpStructRightmostChildTherightmostnodeinthecurrentnavigationstructure.
LeftSiblingOptionalVariant.AnindexintotheNavigationNodescollection.ItcanbeeitherastringthatrepresentsaURL,oranumberthatrepresentsanodeinthecollection.
![Page 235: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/235.jpg)
Remarks
AddinganewfileontotheWebserver(usingtheWebFiles.Addmethod)doesn'timplythatyouareautomaticallyintroducingthefileintothenavigationstructure.ANavigationNodeobjectmustbecreatedseparatelyforthefile.TocreateanewNavigationNodeobject,usetheAddmethodfortheNavigationNodescollection.
NoteWhenatemplateisusedtocreateanewWeb,navigationnodesareautomaticallycreatedforthefilesthathavebeenaddedtotheWebbythetemplate.
AddmethodasitappliestothePageWindowsobject.
AddsanewPageWindowExobjecttothelistofavailableopenitemsinthePageWindowscollection.
NoteOpeninganeworexistingfileobjectbyusingtheAddmethodforthePageWindowExobjectalsoaddsthePageWindowExobjectthatisassociatedwiththeopenedfiletothePageWindowscollection.
expression.Add(FileUrl)
expressionRequired.AnexpressionthatreturnsaPageWindowscollectionobject.
FileUrlOptionalString.AstringthatcontainsthepathfortheWebserverwherethepagewillbestored.ThiscanbeanyabsoluteURLforafile,suchashttp://webserver/fileorfile://filesystem/filefordisk-basedWebs.
![Page 236: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/236.jpg)
Remarks
YoucanuseoneofthreemethodswhenyouwanttoopenHTMLpagesinMicrosoftFrontPagePageview—theAdd,EditorOpenmethod.Whenyouwanttoopen,edit,thensaveafileinPageviewthatexistseitheronafileserveroronafilesystemonyourharddisk,usetheAddmethodforthePageWindowsobject,asshowninthefollowingstatements.
NoteItdoesn'tmatterwherethefilesexist;theycouldresideonaharddisk,server,oraFrontPageWeb.
DimmyFileAsString
myFile="C:\AdventureWorksHTMLFiles\Hiking.htm"
ActiveWeb.ActiveWebWindow.PageWindows.Add(myFile)
Withthismethod,youhaven'taddedthefiletoaFrontPage-basedWeb—you'vejustopenedit.IfmyFileispartofaWeb,andtheWebiscurrentlynotopen,FrontPagewillalsoopentheWeb.
WhenyouwanttoopenandeditanHTMLfilethatexistsonaWeb,usetheEditmethodfortheFilescollectionintherootfolder,asshowninthefollowingstatement.
ActiveWeb.RootFolder.Files("Hiking.htm").Edit
YoucanusetheOpenmethodinthesameway.However,youshouldreservetheOpenmethodforopeningfilesthatarenotHTMLfiles,suchasMicrosoftWorddocuments,imagefiles,andsoon.
YoucanalsousetheAddmethodtoopenanewunsavedPageWindowobject.Youcanuseeitherofthefollowingstatementstoopenanunsavedpagewindow.
SetmyUnsavedPageWindow=ActiveWebWindow.PageWindows.Add()
SetmyUnsavedPageWindow=ActiveWebWindow.PageWindows.Add("")
NoteYoucanusetheexpressionActiveWebWindow.PageWindows.Add("C:\My
![Page 237: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/237.jpg)
Documents\MyWebs\index.htm")asavalidexpressionaslongasindex.htmisavalidFrontPage-basedfilethatresidesinMyWebs.However,ifindex.htmdoesnotresideinMyWebs,yourcodewillfail.Toaddanewpage,youmustfollowtheproceduredescribedearlierinthissection.
AddmethodasitappliestothePropertiesobject.
AddsanewpropertytothelistofavailableitemsinthePropertiescollection.
expression.Add(PropertyKey,PropertyValue)
expressionRequired.AnexpressionthatreturnsthePropertiescollection.
PropertyKeyRequiredString.Astringthatcontainsthenameofthepropertythatyouwanttoadd.Formoreinformation,seethetableofpropertiesinthePropertiescollectiontopic.
PropertyValueRequiredVariant.Thevalueoftheproperty.
![Page 238: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/238.jpg)
Remarks
YoucanprogrammaticallyaddandremovecategoriesandapprovalratingsforthePropertiescollection.
AddmethodasitappliestotheWebFilesobject.
AddsanewWebFileobjecttothelistofavailableitemsintheWebFilescollection.AWebFileobjectisnotrestrictiveandcanbeanytypeoffile;itisnotrestrictedtoanHTMLfiletype—itcouldbeanimagefile,amovie,oranexecutablefile.
NoteUsethismethodtoaddanewfiletoaFrontPage-basedWeb.
expression.Add(FileUrl,ForceOverwrite)
expressionRequired.AnexpressionthatreturnsaWebFilescollection.
FileUrlRequiredString.AstringthatcontainstheURLforthefilesuchas"Inventory.htm".ThiscanbeanyabsoluteURLforafile,suchashttp://webserver/fileorfile://filesystem/filefordisk-basedWebs.
ForceOverwriteOptionalBoolean.
![Page 239: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/239.jpg)
Remarks
AccessingasingleWebFileobjectthroughtheWebFilescollectionprovidesreferencetoaWebFileobjectthatdoesn'thaveaccesstothePageobjectmodeluntiltheWebfileisopened.Oncethefileisopen,thePageWindowobjectassociatedwiththefileprovidesaccesstothePageobjectmodelthatiscompatiblewithMicrosoftInternetExplorer4.0andlater.ForfurtherinformationonusingthePageobjectmodelinyourWebpages,seeExploringtheObjectModelinFrontPage.
AddmethodasitappliestotheWebFoldersobject.
AddsanewWebFolderobjecttothelistofavailableitemsintheWebFolderscollection.
expression.Add(FolderUrl)
expressionRequired.AnexpressionthatreturnsaWebFolderscollection.
FolderUrlRequiredString.AstringthatcontainstheURLforthefolder,suchastheImagesfolderinC:\MyWebs.ThiscanbeanyabsoluteURLforafolder,suchashttp://webserver/folderorfile://filesystem/folderfordisk-basedwebs.
AddmethodasitappliestotheWebPackageobject.
ReturnsaBooleanthatrepresentswhetherthespecifiedfilewassuccessfullyaddedtotheWebpackage.
expression.Add(Url,flags)
expressionRequired.AnexpressionthatreturnsaWebPackageobject.
UrlRequiredString.Thepathandfilenameofthefiletobeadded.
flagsOptionalFpDependencyFlags.Specifieshowtohandledependenciesforthespecifiedfile.DependenciesareincludedonlyiftheyexistwithinthecurrentWebsite.
![Page 240: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/240.jpg)
FpDependencyFlagscanbeacombinationofoneormoreofthefollowingFpDependencyFlagsconstants.
fpDepsDefault Includesallimages,linkbars,hyperlinks,lists,sharedborders,andthemes.
fpDepsImages Includesallimages.fpDepsLinkbars Includesalllinkbars.fpDepsLinks Includesallpagestowhichtherearehyperlinks.
fpDepsLists Includesliststhatmaybeneededinorderforthepagetorendercorrectly.
fpDepsNone Includesnodependencies.fpDepsRecurse Includesallfilesthatareinaspecifiedfolder.fpDepsSharedBorders Includesallsharedborders.fpDepsThemes Includesallthemes.
![Page 241: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/241.jpg)
Remarks
UsetheCreatePackagemethodtocreateanewWebpackage.ThenusetheAddmethodtoaddpagesandtheirspecifieddependenciestotheWebpackage.YoucancreateWebpackagesfromfilesinWebsitesbasedonMicrosoftWindowsSharePointServicesandindisk-basedWebsites.
AddmethodasitappliestotheWebsobject.
AddsanewWebtothelistofavailableitemsintheWebscollection.
SecurityAvoidusinghard-codedpasswordsinyourapplications.Ifapasswordisrequiredinaprocedure,requestthepasswordfromtheuser,storeitinavariable,andthenusethevariableinyourcode.Forrecommendedbestpracticesonhowtodothis,seeSecurityNotesforMicrosoftOfficeSolutionDevelopers.
expression.Add(WebUrl,UserName,Password,WebOpenFlags)
expressionRequired.AnexpressionthatreturnsaWebscollectionobject.
WebUrlRequiredString.AstringthatcontainsthepathfortheWebserverwheretheWebwillbestored.ThiscanbeanyabsoluteURLforaWeb,suchashttp://webserverorfile://filesystemfordisk-basedWebs.
UserNameOptionalString.Theuser'slogonnamefortheWebserver.
PasswordOptionalString.Theuser'spasswordfortheWebserver.
WebOpenFlagsOptional.AnFpWebOpenFlagsconstantthatrepresentsthebehaviorofthenewWeb.
FpWebOpenFlagscanbeoneoftheseFpWebOpenFlagsconstants.fpOpenInWindowdefaultfpOpenNoWindow
AddmethodasitappliestotheWebWindowsobject.
![Page 242: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/242.jpg)
AddsanewWebWindowExobjecttotheWebWindowscollection.
expression.Add(ViewModeEx)
expressionRequired.AnexpressionthatreturnsaWebWindowscollection.
ViewModeExRequired.AnFpWebViewModeExenumeratedconstantthatrepresentstheinformationdisplayedinthenewwindow.
FpWebViewModeExcanbeoneoftheseFpWebViewModeExconstants.fpWebViewExAccessibilityfpWebViewExAllFilesfpWebViewExAssignedTofpWebViewExBrokenLinksfpWebViewExBrowserTypesfpWebViewExCategoriesfpWebViewExCheckoutStatusfpWebViewExComponentErrorsfpWebViewExCSSLinksfpWebViewExDailyPageHitsfpWebViewExDailySummaryfpWebViewExFoldersfpWebViewExLinksfpWebViewExMasterPagesfpWebViewExMonthlyPageHitsfpWebViewExMonthlySummaryfpWebViewExNavigationfpWebViewExOlderFilesfpWebViewExOsTypesfpWebViewExPagefpWebViewExPublishStatusfpWebViewExRecentlyAddedFilesfpWebViewExRecentlyChangedFilesfpWebViewExReferringDomainsfpWebViewExReferringURLs
![Page 243: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/243.jpg)
fpWebViewExRemoteSitefpWebViewExReviewStatusfpWebViewExSearchStringsfpWebViewExSharedBordersfpWebViewExSiteSummaryfpWebViewExSlowPagesfpWebViewExThemesfpWebViewExTodofpWebViewExUnlinkedFilesfpWebViewExUsageSummaryfpWebViewExVisitingUsersfpWebViewExWeeklyPageHitsfpWebViewExWeeklySummary
![Page 244: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/244.jpg)
Example
AsitappliestotheNavigationNodesobject.
Thisexampleaddsanewnodecalledfootnote.htmtothelistofitemsintheNavigationNodescollection.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebs\CohoWinery"thatcontainsafilecalledfootnote.htm.Or,youmaysubstituteanalternativeWebsiteURLorfilename.
PrivateSubAddNewNavNode()
DimmyHomeAsNavigationNode
DimmyNewNodeAsNavigationNode
DimmyFileUrlAsString
myFileUrl="C:\MyDocuments\MyWebs\CohoWinery\footnote.htm"
SetmyHome=ActiveWeb.HomeNavigationNode
SetmyNewNode=_
myHome.Children.Add(myFileUrl,_
"Footnote",fpStructLeftmostChild)
ActiveWeb.ApplyNavigationStructure
EndSub
AsitappliestothePageWindowsobject.
ThisexampleaddstheInventorypageforCohoWinerytothelistofitemsinthePageWindowscollection.WhenyouaddapageusingtheFileUrlargument,thepagethatyouwanttoaddmustexistasafile—youcannotcreateanewpageusingthisargument.Tocreateanunsavednewpage,seethedescriptionintheAddmethod.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebs\CohoWinery"thatcontainsafilecalledInventory.htm.Or,youmaysubstituteanalternativeWebsiteURLorfilename.
PrivateSubAddPage()
DimmyPageWindowsAsPageWindows
DimmyPageAsString
![Page 245: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/245.jpg)
SetmyPageWindows=ActiveWeb.ActiveWebWindow.PageWindows
myPage="C:\MyDocuments\MyWebs\CohoWinery\Inventory.htm"
myPageWindows.Add(myPage)
EndSub
AsitappliestothePropertiesobject.
ThisexampleaddsanewfiletothelistofitemsinthePropertiescollection.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebs\CohoWinery\Zinfandel.htm"thatcontainsafilecalledfootnote.htm.Or,youmaysubstituteanalternativeWebsiteURLorfilename.
PrivateSubCopyrightAdd()
DimmyWebAsWebEx
DimmyCopyrightAsString
DimmyCopyrightPropertyAsVariant
myCopyright="Copyright1999byCohoWinery"
SetmyWeb=Webs.Open("C:\MyWebs\CohoWinery")
myWeb.Activate
ActiveWeb.Properties.Add"Copyright",myCopyright
ActiveWeb.RootFolder.Files("Zinfandel.htm").Open
ActiveDocument.body.insertAdjacentText"BeforeEnd",_
ActiveWeb.Properties("Copyright")
ActivePageWindow.Save
ActiveWeb.Close
EndSub
AsitappliestotheWebsobject.
ThisexampleaddsanewitemtothelistoffilesintheWebscollection.
Webs.Add("C:\MyDocuments\MyWebs\CohoWinery")
AsitappliestotheWebFilesobject.
ThisexampleaddsanewWebFileobjecttothelistofitemsintheFilescollection.
![Page 246: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/246.jpg)
ActiveWeb.RootFolder.Files.Add("C:\NewWebFiles\SalesStatistics.htm")
AsitappliestotheWebFoldersobject.
ThisexampleaddsafoldertothelistofitemsintheWebFolderscollection.
ActiveWeb.RootFolder.Folders.Add("DistributionCenters")
AsitappliestotheWebPackageobject
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 247: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/247.jpg)
AddChoiceMethodAddsanewchoicetothelistofavailablechoicesforthecurrentfield.ThefieldmustbeoftypeListFieldChoice.
expression.AddChoice(text,Index)
expressionRequired.AnexpressionthatreturnsaListFieldChoiceobject.
textRequired.AStringthatrepresentsthetextthatwillappearinthedrop-downlistorbesidearadiobutton.
IndexOptional.ALongthatrepresentsthepositionofthechoicewithinthelistofchoices.
![Page 248: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/248.jpg)
Example
ThefollowingexampleaddstwochoicestoachoicefieldnamedNewChoiceFieldinthefirstlistoftheactiveWebsite.ThenewchoicesareSaleOption1,whichwillappearfirstinthelist,andSaleOption2,whichwillappearsecondinthelist.TherelativepositionsofthechoicesaredeterminedbytheoptionalIndexargument.
SubAddChoice()
DimobjAppAsFrontPage.Application
DimobjLstFldsAslistFields
DimobjFldChoiceAsListFieldChoice
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Setareferencetothenewfieldand
'addtwonewchoicestothelist.
SetobjFldChoice=objLstFlds.Item("NewChoiceField")
objFldChoice.AddChoicetext:="SaleOption1",Index:=1
objFldChoice.AddChoicetext:="SaleOption2",Index:=2
EndSub
![Page 249: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/249.jpg)
ShowAll
![Page 250: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/250.jpg)
AddLinkBarMethodReturnsaNavigationNodeobjectthatrepresentsalinkbar.
expression.AddLinkBar(NodeLabel,ModificationType,LeftSibling)
expressionRequired.AnexpressionthatreturnsaNavigationNodescollection.
NodeLabelRequired.AStringthatrepresentsthelabelornameofthelinkbar.
ModificationTypeRequired.AnFpStructModTypeconstantthatrepresentsthestructureofthelinkbar.
FpStructModTypecanbeoneoftheseFpStructModTypeconstants.fpStructBaseOnSiblingBasethelinkbaronitsclosestsiblingnode.fpStructLeftmostChildBasethelinkbaronitsleftmostchildnode.fpStructRightmostChildBasethelinkbaronitsrightmostchildnode.
LeftSiblingOptional.AVariantthatrepresentstheleftsiblingofthenode.Thisvalueisusedtolocatethenewlinkbarinthehierarchy.
![Page 251: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/251.jpg)
Remark
Thenewnodewillnotappearinthelinkbar.Onlythenode'schildrenwillappearinthelinkbar.
NoteThenewlinkbarmustbeaddedtothestructurebeforechildnodescanbeaddedtoit.
![Page 252: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/252.jpg)
Example
Thefollowingexamplecreatesanewlinkbarthatisbasedonitssiblinginthehierarchyofnavigationnodes.
SubNewLinkBar()
DimobjAppAsFrontPage.Application
DimobjNavNodesAsNavigationNodes
DimobjNavNodeAsNavigationNode
SetobjApp=FrontPage.Application
SetobjNavNodes=objApp.ActiveWeb.AllNavigationNodes
'Referenceanodetouseinthemethod.
SetobjNavNode=objNavNodes.Item(1)
'Createnewlinkbarbasedonsibling.
objNavNodes.AddLinkBarNodeLabel:="Newlinkbar",_
ModificationType:=fpStructBaseOnSibling,_
LeftSibling:=objNavNode
'Applynavigationstructuresonodewillappear.
objApp.ActiveWeb.ApplyNavigationStructure
EndSub
![Page 253: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/253.jpg)
ApplyChangesMethodApplychangestothespecifiedobject.ChangestoapropertyofaWebEx,WebFile,orWebFolderobjectarenotapplieduntilyouusetheApplyChangesmethodforthespecifiedobject.
expression.ApplyChanges
expressionAnexpressionthatreturnsaPropertiescollectionobject.
![Page 254: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/254.jpg)
Example
Thisexamplechangesthevalueofthevti_titlepropertyforafilecalledZinfandel.htmandappliesthechange.
PrivateSubChangeProperties()
DimmyPropertiesAsProperties
SetmyProperties=_
ActiveWeb.RootFolder.Files("Zinfandel.htm").Properties
myProperties("vti_title")="RogueCellarsWineList"
myProperties.ApplyChanges
EndSub
![Page 255: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/255.jpg)
ApplyDynamicTemplateMethodAppliesaDynamicWebTemplatetoadocument.
expression.ApplyDynamicTemplate(bzMaster,pState,)
expressionRequired.AnexpressionthatreturnsaWebFileobject.
bzMasterRequiredString.ThepathandfilenamefortheDynamicWebTemplate.
pStateRequiredDynamicTemplateState.SpecifiestheregionmappingfortheDynamicWebTemplate.UsetheSetHeadMappingandSetBodyMappingmethodsoftheDynamicTemplateStateobjecttocustomizeregionmapping.
![Page 256: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/256.jpg)
Remarks
TodetachaDynamicWebTemplateusetheApplyDynamicTemplatemethodwiththebzMasterparametersettoanemptystring.
![Page 257: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/257.jpg)
Example
ThefollowingexampleappliesthespecifiedDynamicWebTemplatefiletothespecifiedfile.
DimobjStateAsDynamicTemplateState
DimobjFileAsWebFile
SetobjState=Application.CreateDynamicTemplateState
SetobjFile=ActiveWeb.LocateFile("home.htm")
objFile.ApplyDynamicTemplate"template.dwt",objState
![Page 258: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/258.jpg)
ApplyNavigationStructureMethodAppliesthenavigationstructuretothespecifiedobject.
expression.ApplyNavigationStructure
expressionAnexpressionthatreturnsaWebExobject.
![Page 259: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/259.jpg)
Remarks
Therearetwodetailstokeepinmindwhenprogrammaticallycreatingfilesandnavigationnodes:
Navigationlabelscannotbeempty.Changestothenavigationstructurecanbelostifyoudon'tapplythenavigationstructurebeforestartingoperationsthataffectthecontentoftheWebsitesuchasmovingoraddingfilesorfolders.
![Page 260: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/260.jpg)
Example
Thisexampleaddsanavigationnodeastherightmostchildnodeandthenappliesthechangestothenavigationstructure.
PrivateSubAddNewNavNode()
DimmyWebAsWebEx
DimmyChildNodesAsNavigationNodes
DimmyNewNavNodeAsNavigationNode
SetmyWeb=ActiveWeb
SetmyChildNodes=_
myWeb.RootFolder.Files(1).NavigationNode.Children
myNewNavNode=_
myChildNodes.Add(myWeb.Url&"Sale.htm","Sale",_
fpStructRightmostChild)
myWeb.ApplyNavigationStructure
EndSub
![Page 261: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/261.jpg)
ApplyTemplateMethodSomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
AppliesanexistingHTMLtemplatetothecurrentWebsite.
expression.ApplyTemplate(TemplateDir,fOverWrite)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TemplateDirRequiredString.Thepathofthetemplate.
fOverWriteOptional.ABooleanthatdeterminesifthecurrenttemplatewillbeoverwritten.IfTrue,thecurrenttemplatewillbeoverwritten.IfFalse,thecurrenttemplatewillnotbeoverwritten.ThedefaultvalueisFalse.
![Page 262: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/262.jpg)
Example
ThefollowingexampleaddsaspecifiedtemplatetothecurrentWebsiteusingtheApplyTemplatemethod.ThemethodiscalledwiththefApplyThemesandthefOverWriteargumentssettoFalse.ThethemeswillnotbeappliedtothenewWebsiteandanyexistingtemplatewillnotbeoverwritten.
SubUseTemplate()
'AppliesatemplatetothecurrentWebsitewithoutoverwritingtheoriginaltemplate
'orapplyingthemes.
DimobjAppAsFrontPage.Application
DimobjWebAsWebEx
DimstrPathAsString
DimstrnameAsString
SetobjApp=FrontPage.Application
SetobjWeb=objApp.ActiveWeb
'Setvariabletotemplatedirectory.
strPath="C:\ProgramFiles\MicrosoftOffice\Templates\"
'Prompttheuserforthefilenameofthetemplate.
strname=InputBox("Enterthefilenameofthetemplateyouwishtoapply")
'Addthetemplatenametothepathinorderto
'createafullpathname.
strPath=strPath&strname
'ApplythetemplatetothenewWebsite.
objWeb.ApplyTemplateTemplateDir:=strPath,_
fOverWrite:=False
EndSub
![Page 263: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/263.jpg)
ShowAll
![Page 264: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/264.jpg)
ApplyThemeMethodAppliesthevaluecontainedintheThemeNameargumenttothepropertynamedintheThemePropertiesargument.Forexample,athemecanbeappliedtoaWebFile,WebFiles,PageWindowEx,orWebExobjectinaMicrosoftFrontPage-basedWebsite.
expression.ApplyTheme(ThemeName,ThemeProperties)
expressionAnexpressionthatreturnsanobjectintheAppliesTolist.
ThemeNameRequiredString.Astringthatcontainsthenameofthethemethatyouwanttoapplytoafile.TheThemeNameparametercanbeoneofthefollowing:
aftrnoon concrete modular strtedge
arcs corporat nature studio
arctic cypress network sumipntg
artsy deepblue papyrus sunflowr
axis echo passport tabs
balance eclipse piechart technolo
bars edge pixel topo
blank evergreen poetic travel
blends expeditn profile water
blitz folio quad watermar
blocks glacier radial waves
bluecalm global refined willow
blueprnt highway ricepapr zero
boldstri ice ripple
breeze indust rmnsque
canyon inmotion sandston
capsules iris satin
cascade journal sky
checkers layers slate
citrus level sonora
classic loosegst spiral
compass mdshapes spring
![Page 265: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/265.jpg)
ThemePropertiesOptionalFpThemeProperties.Thepropertiesassociatedwiththetheme.
FpThemePropertiescanbeoneoftheseFpThemePropertiesconstants.fpThemeActiveGraphicsfpThemeBackgroundImagefpThemeCSSfpThemeDefaultSettingsfpThemeNamefpThemeNoBackgroundImagefpThemeNoCSSfpThemeNormalColorsdefaultfpThemeNormalGraphicsfpThemePropertiesAllfpThemePropertiesNonefpThemeVividColors
![Page 266: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/266.jpg)
Remarks
ThefollowingcodeappliestheSumiPaintingthemetoafilewithactivegraphics.
DimstrThemeAsString
strTheme="sumipntg"
CallWebFile.ApplyTheme(strTheme,fpThemeActiveGraphics)
Tochangemorethanonethemepropertywhenapplyingthetheme,usetheplussign(+),asshowninthefollowingexample.
strTheme="sumipntg"
WebFile.ApplyTheme(strTheme,_
fpThemeVividColors+fpThemeActiveGraphics)
Thismethodisessentiallythesameoneyou'duseforapplyingathemetoaPageWindowExorWebExobject.
![Page 267: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/267.jpg)
Example
Thisexamplecontainsafunction,ApplyThemeToFilesInFolder,andaprocedurethatyoucanmodifytoapplyanyoftheavailablethemes.ThisexampleappliestheArtsythemetoallfilesinaspecifiedfolder.
NoteTorunthisexample,copythecodeintoamoduleintheMicrosoftVisualBasicEditorandruntheChangeToArtsyprocedure.
FunctionApplyThemeToFilesInFolder(myThemeNameAsString,_
myFolderObjectAsWebFolder)AsBoolean
DimmyFileAsWebFile
DimmyThemeAsTheme
OnErrorGoToERR
ForEachmyFileInmyFolderObject.Files
CallmyFile.ApplyTheme(myThemeName,fpThemePropertiesAll)
NextmyFile
ApplyThemeToFilesInFolder=True
ExitFunction
ERR:
MsgBox"Anerroroccurred:"&ERR.Description,vbCritical,"Error!"
ApplyThemeToFilesInFolder=False
ExitFunction
EndFunction
PrivateSubChangeToArtsy()
ApplyThemeToFilesInFolder"artsy",ActiveWeb.RootFolder
EndSub
![Page 268: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/268.jpg)
CancelRequestsMethodImmediatelycancelsallrequeststotheWebExobjectwithoutsaving.
expression.CancelRequests
expressionAnexpressionthatreturnsaWebExobject.
![Page 269: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/269.jpg)
Example
TheCancelRequestsmethodcanbeusedtostopaprocessthatmaybetakingtoolong,mayappeartobeinaninfiniteloop,orthatmaybecomingfromaquestionablesource.
PrivateSubCancelRequestsToWeb_Click()
DimmyWebAsWebEx
SetmyWeb=ActiveWeb
myWeb.CancelRequests
EndSub
![Page 270: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/270.jpg)
CheckinMethodChecksthespecifiedWebFileobjectintothesourcecontrolproject.
NoteYoumusthaveasourcecontrolprojectinplacebeforeusingthismethod.Forinformationaboutsourcecontrolprojects,refertoManagingSourceControlProjects.
expression.Checkin(Comment,KeepCheckedout)
expressionAnexpressionthatreturnsaWebFileobject.
CommentOptionalString.Adescriptionstring.
KeepCheckedoutOptionalBoolean.Truekeepsthefilecheckedout.DefaultvalueisFalse.
![Page 271: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/271.jpg)
Remarks
TheKeepCheckedoutargumentprovidestheabilitytohavethefileremaininacheckedoutstatewhiletheuserchecksthefileintoMicrosoftVisualSourceSafetorecordthechanges.ThisdoesnotapplytoMicrosoftFrontPageLightWeightsourcecontrol.
![Page 272: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/272.jpg)
Example
Theprograminthisexampleperformsthefollowingitems:
Checksoutafileandputsthepageineditmode.Addsawelcomemessagetothepage.Checksiftheopenpagehasbeenmodified.Savesthepageifithasbeenmodified.Closesthefileandchecksitintotheexistingsourcecontrolproject.
NoteTorunthisexample,youmusthaveasourcecontrolprojectinplaceonaWebsitewithafilecalled"C:\MyDocuments\MyWebSites\RogueCellars\Zinfandel.htm."Or,youmaysubstituteaWebsiteandfileofyourchoice.
PrivateSubCheckinFile()
DimmyWebAsWebEx
DimmyFileAsWebFile
DimmyPageWindowAsPageWindowEx
DimmyWelcomeAsString
SetmyWeb=Webs("C:/MyWebSites/RogueCellars")
myWelcome="WelcometomyWebSite!"
SetmyFile=myWeb.RootFolder.Files("Zinfandel.htm")
myFile.Checkout
SetmyPageWindow=myFile.Edit(fpPageViewNormal)
WithmyPageWindow
myPageWindow.Document.body.insertAdjacentText("BeforeEnd",_
myWelcome)
IfmyPageWindow.IsDirty=TrueThenmyPageWindow.Save
.Close
EndWith
myFile.Checkin
EndSub
![Page 273: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/273.jpg)
CheckoutMethodChecksthespecifiedWebFileobjectouttothesourcecontrolproject.
NoteYoumusthaveasourcecontrolprojectinplacebeforeusingthismethod.Forinformationaboutsourcecontrolprojects,refertoManagingSourceControlProjects.
expression.Checkout(ForceCheckout)
expressionAnexpressionthatreturnsaWebFileobject.
ForceCheckoutOptionalBoolean.Forcesacheckout,evenifthefileisalreadycheckedout.Trueforcesacheckoutofthefile.DefaultvalueisFalse.
![Page 274: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/274.jpg)
Remarks
TheForceCheckoutargumentprovidestheadministratorwiththeabilitytoforceacheckoutincaseswhereafilehasbeencheckedoutbyauserwhoisunavailabletocheckthefilebackin.
![Page 275: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/275.jpg)
Example
Theprograminthisexampleperformsthefollowing:
Checksoutafilefromanexistingsourcecontrolprojectandputsthefileineditmode.Addsawelcomemessagetothedocument.Checksiftheopenpagehasbeenmodified.Savesthepage,ifithasbeenmodified.Closesthefileandchecksitintotheexistingsourcecontrolproject.
NoteTorunthisexample,youmusthaveasourcecontrolprojectinplaceonaWebsitewithafilecalled"C:\MyDocuments\MyWebSites\RogueCellars\Zinfandel.htm".Or,youmaysubstituteanalternativeWebsiteandfilename.
PrivateSubCheckoutFile()
DimmyWebAsWebEx
DimmyFileAsWebFile
DimmyPageWindowAsPageWindowEx
DimmyWelcomeAsString
SetmyWeb=Webs("C:/MyWebSites/RogueCellars")
myWelcome="WelcometomyWebSite!"
SetmyFile=myWeb.RootFolder.Files("Zinfandel.htm")
myFile.Checkout
SetmyPageWindow=myFile.Edit(fpPageViewNormal)
WithmyPageWindow
myPageWindow.Document.body.insertAdjacentText("BeforeEnd",_
myWelcome)
IfmyPageWindow.IsDirty=TrueThenmyPageWindow.Save
.Close
EndWith
myFile.Checkin
EndSub
![Page 276: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/276.jpg)
![Page 277: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/277.jpg)
ClearChoicesMethodRemovestheavailablechoicesforachoicefield.
expression.ClearChoices
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 278: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/278.jpg)
ShowAll
![Page 279: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/279.jpg)
CloseMethodClosemethodasitappliestothePageWindowExobject.
ClosesthespecifiedPageWindowExobject.
expression.Close(ForceSave,PromptUser)
expressionRequired.Anexpressionthatreturnstheaboveobject.
ForceSaveOptionalBoolean.TrueforcesthespecifiedfiletobesavedbeforetheClosemethodiscompleted.DefaultisFalse.
PromptUserOptionalBoolean.Truepromptstheuserbeforeclosingthepage.DefaultisFalse.
ClosemethodasitappliestothePageWindowsobject.
ClosesthespecifiedpagesinthePageWindowscollection,or,ifNull,closesallopenpagesinthePageWindowscollection.
expression.Close(Index,ForceSave,PromptUser)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexOptionalVariant.ReferstoanindividualiteminthePageWindowscollection.Canbeanynumbercorrespondingtoaniteminthecollection,withtheindexstartingatzero.
ForceSaveOptionalBoolean.TrueforcesthespecifiedfiletobesavedbeforetheClosemethodiscompleted.DefaultisFalse.
PromptUserOptionalBoolean.Truepromptstheuserbeforeclosingthepages.DefaultisFalse.
ClosemethodasitappliestotheWebWindowsobject.
![Page 280: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/280.jpg)
ClosesthespecifiedWebWindowExobject.
expression.Close(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexOptionalVariant.ReferstoanitemintheWebWindowscollection.Canbeanynumbercorrespondingtoaniteminthecollection,withtheindexstartingatzero.
ClosemethodasitappliestotheWebExandWebWindowExobjects.
Closesthespecifiedobject.
expression.Close
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 281: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/281.jpg)
Example
AsitappliestothePageWindowExobject.
Thefollowingexampleclosestheactivepagewindow.
SubCloseWindow()
'Closestheactivepagewindow
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
IfNotobjApp.ActivePageWindowIsNothingThen
objApp.ActivePageWindow.CloseForceSave:=True
EndIf
EndSub
AsitappliestothePageWindowscollection.
ThefollowingexampleclosesthefirstpagewindowofthefirstWebsiteintheWebWindowscollection.
SubCloseWindow()
'Closesapagewindow
DimobjAppAsFrontPage.Application
DimobjPgeWindowsAsPageWindows
SetobjApp=FrontPage.Application
SetobjPgeWindows=objApp.ActiveWeb.WebWindows(0).PageWindows
objPgeWindows.CloseIndex:=0,ForceSave:=True
EndSub
AsitappliestotheWebWindowsobject.
ThefollowingexampleclosesallopenWebwindows.
SubCloseWindow()
'ClosesallWebpagewindows.
DimobjAppAsFrontPage.Application
![Page 282: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/282.jpg)
DimobjPgeWindowsAsWebWindows
SetobjApp=FrontPage.Application
SetobjWebWindows=objApp.ActiveWeb.WebWindows
objWebWindows.Close
EndSub
AsitappliestotheWebExandWebWindowExobjects.
ThefollowingexampleclosestheactiveWebsite(ifoneexists).
SubCloseWindow()
'Closestheactivedocument
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
IfNotobjApp.ActiveWebIsNothingThen
objApp.ActiveDocument.Close
EndIf
EndSub
![Page 283: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/283.jpg)
ShowAll
![Page 284: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/284.jpg)
ConvertToFieldMethodChangesafieldfromonetypetoanotherandreturnstheobjectspecifiedintheTypeparameter.
expression.ConvertToField(Type)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
TypeRequiredFpFieldType.Specifiesthetypeoffieldtowhichtoconvertthespecifiedfield.
FpFieldTypecanbeoneofthefollowingFpFieldTypeconstants.
fpFieldAttachments ReturnsaListFieldAttachmentsobject.fpFieldChoice ReturnsaListFieldChoiceobject.fpFieldComputed ReturnsaListFieldComputedobject.fpFieldCounter ReturnsaListFieldCounterobject.fpFieldCurrency ReturnsaListFieldCurrencyobject.fpFieldDateTime ReturnsaListFieldDateTimeobject.fpFieldFile ReturnsaListFieldFileobject.fpFieldInteger ReturnsaListFieldIntegerobject.fpFieldLookup ReturnsaListFieldLookupobject.fpFieldMultiLine ReturnsaListFieldMultilineobject.fpFieldNumber ReturnsaListFieldNumberobject.fpFieldRatingScale ReturnsaListFieldRatingScaleobject.fpFieldSingleLine ReturnsaListFieldSingleLineobject.fpFieldTrueFalse ReturnsaListFieldTrueFalseobject.fpFieldURL ReturnsaListFieldURLobject.
![Page 285: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/285.jpg)
Remarks
Thefollowingchartspecifieswhetheronefieldtypecanbeconvertedtoanotherfieldtypeandhowtheconversionworksifspecialconversionisnecessary.
FromField/ToField
Text Choice NoteNote(Rich
TextEnabled)
Number
Text N/A Yes Yes Yes
Yes;convertsnumbersandsetsothervaluestoNULL
Choice Yes N/A Yes Yes
Yes;convertsnumbersandsetsothervaluestoNULL
Note
Yes;convertsandtruncatestexttolessthan255characters.
Yes;convertsandtruncatestextto255characters.
N/A Yes
Yes;convertsnumbersandsetsothervaluestoNULL
Note(RichText
Enabled)
No No Yes N/A No
Number Yes Yes Yes Yes N/A
Currency Yes Yes Yes Yes Yes
![Page 286: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/286.jpg)
DateTime Yes Yes Yes Yes No
Boolean Yes;convertsto0or1.
Yes;convertsto0or1.
Yes;convertsto0or1.
Yes;convertsto0or1.
Yes;convertsto0or1.
Multi-valuechoice
Yes Yes Yes Yes Yes
![Page 287: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/287.jpg)
CopyMethodCopiesthespecifiedobjecttoadesignatedURL.Duringthecopyprocessyoucanchoosetoupdatehyperlinksorforceafileoverwriteifthespecifiedobjecthasthesamenameasthedesignatedobject.
expression.Copy(DestinationUrl,Unused,ForceOverwrite)
expressionAnexpressionthatreturnsaWebFileorWebFolderobject.
DestinationUrlRequiredString.ThetargetURL.
UnusedOptionalBoolean.Thisparameterisunused.SettingitornotsettingitwillhavenoeffectonthefunctionalityoftheCopymethod.
ForceOverwriteOptionalBoolean.Specifieswhethertoforceafileoverwritewhenafileorfolderisfoundwiththesamename.SettheargumenttoTruetoforceafileoverwrite.DefaultvalueisFalse.
![Page 288: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/288.jpg)
Remarks
TheCopymethodonlycopiesfilesorfolderswithinthesameWebsite.YoucannotcopyacrossWebsites.However,youcanusetheSaveAsmethodforthePageWindowExobjecttosaveapagethathasitsfilecurrentlylocatedinoneWebsitetosavethepagetoafileinanotherWebsite.Or,youcanusetheAddmethodfortheWebFileobjecttoaddafilethatiscurrentlylocatedinoneWebsitetoanotherWebsite.
![Page 289: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/289.jpg)
Example
ThisexamplecopiesafilefromtheCohoWineryfoldertoanInventoryfolderwithinthesameWebsite.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\CohoWinery."Or,youmaysubstituteanalternativeWebsiteandfilename.
PrivateSubFileCopy()
DimmyFileAsWebFile
SetmyFile=ActiveWeb.RootFolder.Files("Zinfandel.htm")
myFile.Copy"C:\MyWebSites\CohoWinery\Inventory\Zinfandel.htm"
EndSub
![Page 290: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/290.jpg)
CreateDynamicTemplateStateMethodReturnsaDynamicTemplateStateobjectthatrepresentsasetofregionmappingstousewhenapplyingorupdatingaDynamicWebTemplate.
expression.CreateDynamicTemplateState
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 291: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/291.jpg)
Example
ThefollowingexamplecreatesareferencetoaDynamicWebTemplate.
DimobjStateAsDynamicTemplateState
SetobjState=Application.CreateDynamicTemplateState
![Page 292: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/292.jpg)
CreatePackageMethodReturnsaWebPackageobjectthatrepresentsacollectionofpages,files,andfoldersandtheirrelateddependencies,suchasimages,cascadingstylesheets,andJavaScriptfiles.
expression.CreatePackage(Title)
expressionRequired.AnexpressionthatreturnsaWebExobject.
TitleRequiredString.ThenameoftheWebpackage.ThisvaluebecomesthevalueoftheTitlepropertyfortheWebPackageobject.
![Page 293: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/293.jpg)
Remarks
UsetheCreatePackagemethodtocreatetheWebPackageobject.UsetheAddmethodtoaddpagestotheWebpackage.ThenusetheSavemethodtosavethenewWebpackagetodisk.UsetheRemovemethodtoremovefilesthatwereaddedbyusingtheAddmethod.
YoucancreateWebpackagesfromfilesinWebsitesbasedonMicrosoftWindowsSharePointServicesandindisk-basedWebsites.
![Page 294: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/294.jpg)
Example
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 295: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/295.jpg)
CreateSearchInfoMethodReturnsaSearchInfoobjectthatrepresentsacustomfindorfindandreplaceoperation.
expression.CreateSearchInfo
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 296: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/296.jpg)
Example
ThefollowingexamplefindsthenextoccurrenceofthePelementintheactivedocument.
DimobjSearchAsSearchInfo
DimblnFoundAsBoolean
DimobjRangeAsIHTMLTxtRange
SetobjSearch=Application.CreateSearchInfo
objSearch.Find="p"
objSearch.Action=fpSearchFindTag
SetobjRange=Application.ActiveDocument.selection.createRange
blnFound=Application.ActiveDocument.Find(objSearch,Nothing,objRange)
IfblnFound=TrueThenobjRange.Select
![Page 297: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/297.jpg)
DecodeURLMethodReturnsaStringthatrepresentsadecodedWebaddressforthespecifiedencodedWebaddress.
expression.DecodeURL(bstrEncodedURL)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
bstrEncodedURLRequiredString.TheencodedWebaddresstodecode.
![Page 298: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/298.jpg)
Remarks
DecodingaURLincludesreplacing"%20"withspaces.UsetheEncodeURLmethodtoencodeaWebaddress.
![Page 299: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/299.jpg)
Example
ThefollowingexampledecodesthespecifiedWebaddress.
DimstrDecodedURLAsString
strDecodedURL=Application.DecodeURL_
("http://www.fourthcoffee.com/our%20best%20coffee.htm")
![Page 300: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/300.jpg)
ShowAll
![Page 301: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/301.jpg)
DeleteMethodDeletemethodasitappliestotheNavigationNodesobject.
DeletesanindividualnavigationnodefromthelistofavailablenodesintheNavigationNodescollection.
expression.Delete(Index)
expressionRequired.AnexpressionthatreturnsaNavigationNodesobject.
IndexOptionalVariant.Referstoaniteminthenavigationstructure.Canbeanynumbercorrespondingtoaniteminthenavigationstructure,withtheindexstartingatzero.
DeletemethodasitappliestothePropertiesobject.
DeletesapropertyfromthelistofavailablepropertiesinthePropertiescollection.
expression.Delete(PropertyKey)
expressionRequired.AnexpressionthatreturnsaPropertiesobject.
PropertyKeyRequiredString.Astringthatrepresentsthepropertyname.
DeletemethodasitappliestotheWebExobject.
DeletesaWebsitefromthelistofavailableWebsitesintheWebscollection.
expression.Delete(WebDeleteFlags)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
WebDeleteFlagsOptionalFpWebDeleteFlags.DetermineswhatisdeletedfromthecurrentWebsite.DefaultisfpDeleteEntireWeb.
![Page 302: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/302.jpg)
FpWebDeleteFlagscanbeoneoftheseFpWebDeleteFlagsconstants.fpDeleteEntireWebdefaultfpDeleteFrontPageInfoFromWeb
DeletemethodasitappliestotheWebFilesandWebFoldersobjects.
DeletesataskfromthelistofavailabletasksintheWebFilescollection,orafolderorfoldersfromthelistofavailablefoldersintheWebFolderscollection.
expression.Delete(Index)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
IndexRequiredVariant.ReferstoanitemintheWebFilesorWebFolderscollection.Canbeanynumbercorrespondingtoaniteminthecollection,withtheindexstartingatzero.
DeletemethodasitappliestotheWebsobject.
DeletesaWebsitefromthelistofavailableWebsitesintheWebscollection.
expression.Delete(Index,WebDeleteFlags)
expressionRequired.AnexpressionthatreturnsaWebsobject.
IndexRequiredVariant.ReferstoanitemintheWebscollection.Canbeanynumbercorrespondingtoaniteminthecollection,withtheindexstartingatzero.
WebDeleteFlagsOptionalFpWebDeleteFlags.DetermineswhatisdeletedfromthecurrentWebsite.DefaultisfpDeleteEntireWeb.
FpWebDeleteFlagscanbeoneoftheseFpWebDeleteFlagsconstants.fpDeleteEntireWebdefaultfpDeleteFrontPageInfoFromWeb
DeletemethodasitappliestoallotherobjectsintheAppliesTolist.
![Page 303: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/303.jpg)
DeletesthespecifiedobjectfromaWebsite.
expression.Delete
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 304: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/304.jpg)
Example
AsitappliestotheNavigationNodesobject.
ThisexampledeletesthefourthnavigationnodeofthesecondfileintheactiveWebsite.
NoteYoumustapplythenavigationstructuretotheWebsiteinorderforthechangestobeappliedtotheWebsite.
PrivateSubDeleteNavNode()
DimmyWebAsWebEx
DimmyChildNodesAsNavigationNodes
DimintResponseAsInteger
SetmyWeb=ActiveWeb
SetmyChildNodes=_
myWeb.RootFolder.WebFiles(1).NavigationNode.Children
intResponse=MsgBox("Areyousureyouwantto"&_
"deletethisnavigationnode?",vbYesNo)
IfintResponse=vbYesThen
CallmyChildNodes.Delete(3)
myWeb.ApplyNavigationStructure
EndIf
EndSub
AsitappliestothePropertiesobject.
ThisexampledeletestheSaleTextpropertyfromtheSales.htmfile.
PrivateSubDeleteProperty()
DimmyFileAsWebFile
DimmyPropAsString
DimintResponseAsInteger
myProp="SaleText"
SetmyFile=ActiveWeb.RootFolder.Files("Sales.htm")
intResponse=MsgBox("Areyousureyouwanttodeletethe"&_
myProp&"property?",vbYesNo)
![Page 305: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/305.jpg)
Ifintrespons=vbYesThen
myFile.Properties.DeletemyProp
EndIf
EndSub
AsitappliestotheWebExobject.
ThisexampledeletesatemporaryWebsitecalledTempWeb.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\TempWeb".Or,youmaysubstituteanalternativeWebsiteURL.
PrivateSubDeleteWeb()
DimmyWebAsWebEx
DimmyTempWebAsWebEx
DimmyFoldersAsWebFolders
DimmyFolderAsWebFolder
DimmyWebToDeleteAsString
DimintResponseAsString
SetmyWeb=Webs.Open("C:\MyDocuments\MyWebs")
SetmyFolders=myWeb.RootFolder.Folders
myWebToDelete="TempWeb"
ForEachmyFolderInmyFolders
IfmyFolder.IsWeb=TrueThen
IfmyFolder.Name=myWebToDeleteThen
intResponse=MsgBox("Areyousureyouwanttodelete"&_
"the"&myFolder.Name&"subWebsite?",vbYesNo)
IfintResponse=vbYesThen
SetmyTempWeb=Webs.Open(myFolder.Name)
myTempWeb.Delete
EndIf
EndIf
EndIf
Next
ActiveWebWindow.Close
EndSub
AsitappliestotheWebFilescollection.
ThisstatementdeletesafileintheactiveWebsite.
![Page 306: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/306.jpg)
NoteTorunthisexample,youmusthaveafilecalled"C:\MyDocuments\MyWebSites\TempFile.htm".Or,youmaysubstituteanalternativefilename.
PrivateSubDeleteWebFile()
DimintResponseAsInteger
intResponse=MsgBox("Areyousureyouwant"&_
"todeletethisfile?",vbYesNo)
IfintResponse=vbYesThen
ActiveWeb.RootFolder.Files.Delete"TempFile"
EndIf
EndSub
![Page 307: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/307.jpg)
ShowAll
![Page 308: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/308.jpg)
EditMethodTheEditmethodisusedtoopenMicrosoftFrontPagecompatiblefilesinapagewindow.ThesefilesincludefileformatssuchasHTML,CSS,andASP.Toopenfilesofothertypes,usetheOpenmethod.
NoteHTMLfileswithoutextensionswillnotopenwiththeEditmethod.
expression.Edit(ViewMode)
expressionAnexpressionthatreturnsaWebFileobject.
ViewModeOptionalFpPageViewMode.
FpPageViewModecanbeoneoftheseFpPageViewModeconstants.fpPageViewDefaultdefaultfpPageViewHtmlfpPageViewNoFramesfpPageViewNormalfpPageViewNoWindowfpPageViewPreview
![Page 309: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/309.jpg)
Example
ThisexampleshowshowtousetheEditmethodtoopenafileforediting.
NoteTorunthisprogram,youmusthaveaWebsiteopenthatcontainsafilecalled"RedWines.htm."Or,youmaysubstituteafileofyourchoice.
PrivateSubModifyFile()
DimmyFileAsWebFile
SetmyFile=ActiveWeb.RootFolder.Files("RedWines.htm")
myFile.Edit
EndSub
![Page 310: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/310.jpg)
EncodeURLMethodReturnsaStringthatrepresentstheencodedWebaddressforthespecifiedWebaddress.
expression.EncodeURL(bstrDecodedURL)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
bstrDecodedURLRequiredString.TheWebaddresstoencode.
![Page 311: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/311.jpg)
Remarks
EncodingaURLincludesreplacingspaceswith"%20".UsetheDecodeURLmethodtodecodeaWebaddress.
![Page 312: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/312.jpg)
Example
thefollowingexampleencodesthespecifiedWebaddress.
DimstrEncodedURLAsString
strEncodedURL=Application.EncodeURL_
("http://www.fourthcoffee.com/ourbestcoffee.htm")
![Page 313: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/313.jpg)
ShowAll
![Page 314: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/314.jpg)
ImportWebPackageMethodReturnsanFpPkgImportResultthatrepresentswhetherthespecifiedpackagewasimportedorwhethertherewereproblemswiththeimport.
FpPkgImportResultcanbeoneofthefollowingFpPkgImportResultconstants.
fpPkgImportCancelled Importwascancelledbytheuser.fpPkgImportComplete Importwascompletedsuccessfully.
fpPkgImportErrorInPackageImportwascancelledbecauseanerrorinthepackagewasfound(forexample,aninvalidmanifestordamagedfiles).
fpPkgImportFailed Importfailedforanunknownreason.
fpPkgImportNotTrusted
ImportwascancelledbecausethepackagewasnotsignedbyatrustedcertificateortheFpPkgTrustLevelparameterwasnotsettofpPkgTrustAll.
fpPkgImportServerNotSupportedImportwascancelledbecausetheserveronwhichtheWebsiteislocateddoesnotsupportWebpackages.
fpPkgImportStopped
Importwascancelledbecauseafile,folder,orlistconflictcausedtheimportprocesstostopasaresultofthevalueofthefpConflictOptsparameter
expression.ImportWebPackage(packageFileName,urlDeployTo,FpPkgTrustLevel,fpConflictOpts)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
packageFileNameRequiredString.Thepathandfilenameofthepackagetobeimported.
urlDeployToRequiredString.Thepathtowhichtoimportthefilesincluded
![Page 315: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/315.jpg)
intheWebpackage.
FpPkgTrustLevelRequiredFpPkgTrustLevel.SpecifieswhethertotrustallWebpackagesoronlythosethataredigitallysignedbyatrustedsource.
FpPkgTrustLevelcanbeoneofthefollowingFpPkgTrustLevelconstants.
fpPkgTrustAllfpPkgTrustCertificateStore
fpConflictOptsRequiredFpPkgImportConflictOpts.Specifieshowtohandleconflicts.
FpPkgImportConflictOptscanbeoneofthefollowingFpPkgImportConflictOptsconstants.
fpPkgFileConflictMaskfpPkgListConflictMask
fpPkgOnConflictSkipSkipsimportinganyfilesifaconflictariseswhenimportingaWebpackage,andcontinuestheimportprocess.
fpPkgOnConflictStop
StopstheimportprocessifanyconflictariseswhenimportingaWebpackage,andcontinuestheimportprocess.
fpPkgOnFileConflictOverwrite Ifafileconflictexists,overwritesthatfile.
fpPkgOnFileConflictSkip
SkipsimportingafileintheWebpackagethatconflictswithafileintheWebsite,andcontinuestheimportprocess.
fpPkgOnFileConflictStopStopstheimportprocessifafileiftheWebpackageconflictswithanexistingfileintheWebsite.
fpPkgOnListConflictMergeOrRename
Mergeslistsiftheyarecompatible;otherwise,theWeblistsarebackedupandimported,andtheimportprocesscontinues.
![Page 316: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/316.jpg)
fpPkgOnListConflictMergeOrSkipMergeslistsifcompatible;otherwise,theimportprocessskipstheconflictinglistsandcontinues.
fpPkgOnListConflictMergeOrStop Mergeslistsifcompatible;otherwise,theimportprocessstops.
fpPkgOnListConflictRename Backsupallconflictinglistsandcontinuestheimportprocess.
fpPkgOnListConflictSkip Skipsdeploymentofalistifalistconflictexists.
fpPkgOnListConflictStop StopstheimportprocessofaWebpackageifalistconflictexists.
![Page 317: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/317.jpg)
Remarks
YoucanimportWebpackagesonlyintoWebsitesbasedonMicrosoftWindowsSharePointServices.
![Page 318: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/318.jpg)
Example
ThefollowingexampleimportsthespecifiedWebpackageintoanewfolderintheactiveWebsite.
DimobjWebAsWebEx
DimobjFolderAsWebFolder
SetobjWeb=ActiveWeb
SetobjFolder=objWeb.AllFolders.Add("NewWebPackageFolder")
objWeb.ImportWebPackage"c:\NewWebPackage.fwp",objFolder.Url,_
fpPkgTrustCertificateStore,fpPkgOnListConflictSkip
![Page 319: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/319.jpg)
LocateFileMethodReturnsthespecifiedWebFileobject.
expression.LocateFile(FileUrl)
expressionAnexpressionthatreturnsaWebExobject.
FileUrlRequiredString.DefaultvalueisthefileportionoftheURL.
![Page 320: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/320.jpg)
Example
ThisexamplelocatesafileintherootdirectoryoftheWebsiteandputsthefileineditmode.
NoteYoumusthaveaWebsiteopenandafilecalled"Zinfandel.htm,"oryoumaysubstituteafileofyourchoice.
PrivateSubLocateAFile()
DimmyFileAsWebFile
SetmyFile=Webs(0).LocateFile("Zinfandel.htm")
myFile.Edit
EndSub
Inmostcases,youwouldprobablyusetheentireURLfortheStringargumentoftheLocateFilemethod—forexample,ifyouwantedtolocatethefileFirst_Qtr.htminC:/MyDocuments/MyWebSites/RogueCellars/Inventory/First_Qtr.htm.AnytimeafolderexistsinaleveldeeperthantherootdirectoryoftheWebsite,usetheentireURLasshowninthefollowingexample.
PrivateSubGetFile()
DimmyFileAsString
DimmyFileFoundAsWebFile
myFile=_
"C:/MyDocuments/MyWebSites/RogueCellars/Inventory/First_Qtr.htm"
SetmyFileFound=Webs(0).LocateFile(myFile)
EndSub
However,thereisashortcut.Forexample,ifyouwanttolocateafileinanimagesfolderthatresidesintherootdirectoryoftheWebsite,youcanusearelativeaddressbyusingaforwardslashfollowedbythesubfolderandfilenameasshowninthefollowingstatement.
SetmyFileFound=Webs(0).LocateFile("images/JPG/myJPGFileList.htm")
NoteYoucannotsubstituteabackslashinarelativeaddress.
![Page 321: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/321.jpg)
![Page 322: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/322.jpg)
LocateFolderMethodReturnsthespecifiedWebFolderobject.
expression.LocateFolder(FolderUrl)
expressionAnexpressionthatreturnsaWebFolderobject.
FolderUrlRequiredString.ThedefaultvalueisthefolderportionoftheURL.
![Page 323: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/323.jpg)
Example
ThisexamplelocatesafolderintherootdirectoryofaWebsite.
NoteYoumusthaveaWebsiteopenforalloftheseexamples.
PrivateSubLocateAFolder()
DimmyFolderFoundAsWebFolder
SetmyFolderFound=Webs(0).LocateFolder("images")
EndSub
Inmostcases,youwouldprobablyusetheentireURLfortheStringargumentoftheLocateFoldermethod.Forexample,afoldermaybeseverallevelsdeepinthefolderhierarchy,suchasC:/MyDocuments/MyWebSites/RogueCellars/Inventory/First_Quarter—andyouwanttolocateFirst_Quarter.AnytimeafolderexistsinaleveldeeperthantherootdirectoryoftheWebsite,usetheentireURLasshowninthefollowingexample.
PrivateSubGetFolder()
DimmyFolderAsString
DimmyFolderFoundAsWebFolder
myFolder=_
"C:/MyDocuments/MyWebSites/RogueCellars/Inventory/First_Quarter"
SetmyFolderFound=_
Webs(0).LocateFolder(myFolder)
EndSub
However,thereisashortcut.Forexample,ifyouwanttolocateanimagesfolderthatresidesintherootdirectoryoftheWebsite,youcanusearelativeURLbyusingaforwardslashfollowedbythesubfoldernameasshowninthefollowingstatement.
SetmyFolderFound=Webs(0).LocateFolder("images/JPG")
NoteYoucannotsubstituteabackslashinarelativeURL.
![Page 324: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/324.jpg)
![Page 325: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/325.jpg)
ShowAll
![Page 326: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/326.jpg)
LocatePageMethodLocatePagemethodasitappliestotheApplicationobject.
ReturnsaPageWindowExobjectforthespecifiedobject.
expression.LocatePage(DocumentUrl,ViewMode)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
DocumentUrlRequired.AStringthatrepresentsthedocumentorfileportionoftheentireURL.ThiscanbeanyabsoluteURL,suchas"http://webserver/file"or"file://filesystem/file"fordisk-basedWebsites.ThedefaultvalueisthefileportionoftheURL.
ViewModeOptional.AnFpPageViewModeconstantthatrepresentstheviewmode.
FpPageViewModecanbeoneoftheseFpPageViewModeconstants.fpPageViewDefaultdefaultfpPageViewHtmlfpPageViewNoFramesfpPageViewNormalfpPageViewNoWindowfpPageViewPreview
LocatePagemethodasitappliestotheWebExobject.
ReturnsthePageWindowExobjectassociatedwiththecurrentWebsite.
expression.LocatePage(FileUrl,ViewMode)
expressionRequired.AnexpressionthatreturnsaWebExobject.
FileUrlRequired.AStringthatrepresentsthedocumentorfileportionoftheentireURL.
![Page 327: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/327.jpg)
ViewModeOptional.AnFpPageViewModeconstantthatrepresentstheviewmode.
FpPageViewModecanbeoneoftheseFpPageViewModeconstants.fpPageViewDefaultdefaultfpPageViewHtmlfpPageViewNoFramesfpPageViewNormalfpPageViewNoWindowfpPageViewPreview
![Page 328: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/328.jpg)
Example
ThisexamplelocatesapageintherootWebsiteandasubsite.
PrivateSubLocatePages()
DimmyRootPageAsPageWindowEx
DimmyWebPageAsPageWindowEx
SetmyRootPage=_
Application.LocatePage("Zinfandel.htm",fpPageViewNormal)
SetmyWebPage=_
Webs(1).LocatePage("Zinfandel.htm",fpPageViewNormal)
EndSub
![Page 329: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/329.jpg)
MakeAbsMethodReturnsaStringthatrepresentsanabsoluteURLfortheStringspecifiedintheURLparameter,usingtheURLBaseparameterasthestartingpoint.IftheURLisalreadyabsolute,theURLisreturnedunchanged.FormoreinformationaboutabsoluteandrelativeURLs,refertoUnderstandingAbsoluteandRelativeURLAddressing.
expression.MakeAbs(UrlBase,Url)
expressionAnexpressionthatreturnsaApplicationobject.
UrlBaseRequiredVariant.AbaseURL.CanbeastringoraWebEx,WebFolder,WebFile,NavigationNode,orIHTMLDocument2object.
UrlRequiredString.AstringthatcontainstheentireURLfortheWebsite.ThiscanbeanyURLforaWebsite,suchas"http://webserver/folder"or"file://filesystem/folder"fordisk-basedWebsites.
![Page 330: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/330.jpg)
Example
ThisexamplechangesarelativeURLtoanabsoluteURL.
NoteTorunthisexample,youmusthaveaWebsiteandafilecalled"C:\MyDocuments\MyWebSites\RogueCellars\Zinfandel.htm."Or,youmaysubstituteanalternativeWebsiteURLorfilename.
PrivateSubMakeURLAbsolute()
DimmyBaseURLAsWebEx
DimmyAbsAddressAsString
DimmyLocalUrlAsString
myBaseURL=Webs.Open("C:\MyWebSites")
myLocalUrl="Zinfandel.htm"
myAbsAddress=MakeAbs(myBaseURL,myLocalUrl)
EndSub
![Page 331: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/331.jpg)
MakeRelMethodReturnsaStringthatrepresentsarelativeURLfortheStringspecifiedintheURLparameter,usingtheURLBaseparameterasthestartingpoint.IftheURLisalreadyrelativetotheURLBaseparameter,theURLisreturnedunchanged.FormoreinformationaboutabsoluteandrelativeURLs,refertoUnderstandingAbsoluteandRelativeURLAddressing.
expression.MakeRel(UrlBase,Url)
expressionAnexpressionthatreturnsanApplicationobject.
UrlBaseRequiredVariant.AbaseURL.CanbeastringoraWebEx,WebFolder,WebFile,NavigationNode,orIHTMLDocument2object.
UrlRequiredString.AstringthatcontainstheentireURL.ThiscanbeanyURLforaWebsite,suchas"http://webserver/folder"or"file://filesystem/folder"fordisk-basedWebsites.
![Page 332: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/332.jpg)
Example
ThisexamplechangesanabsoluteURLtoarelativeURL,addsahyperlinktotheactivedocumentusingtherelativeURL,andthensavesthechangestothedocument.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\RogueCellars."Youmustalsohavetwofiles,onecalled"Zinfandel.htm"andtheothercalled"index.htm,"whichhasanabsoluteURL(thedefaultstate).Or,youmaysubstituteanalternativeWebsiteURLandfilenames.
PrivateSubMakeURLRelative()
DimmyFileAsWebFile
DimmyFile2AsWebFile
DimmyBaseURLAsWebEx
DimmyDocAsFPHTMLDocument
DimmyRelAddressAsString
DimmyRelAddress2AsString
SetmyBaseURL=Webs.Open("C:\MyDocuments\MyWebSites\RogueCellars")
SetmyFile=myBaseURL.RootFolder.Files("Zinfandel.htm")
SetmyFile2=myBaseURL.RootFolder.Files("index.htm")
SetmyDoc=myFile.Edit(fpPageViewNormal).Document
myRelAddress=MakeRel(myBaseURL,myFile2.Url)
myRelAddress2=""""&myRelAddress&""""
CallmyDoc.body.insertAdjacentHTML("BeforeEnd","<ahref="_
&myRelAddress2&">"&myRelAddress&"</a>")
ActivePageWindow.Save
EndSub
![Page 333: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/333.jpg)
MakeWebMethodCreatesanewWebsitefromanexistingfolder.TocreateanewWebsitewithoutfirstcreatingafolder,seetheAddmethod.
SecurityAvoidusinghard-codedpasswordsinyourapplications.Ifapasswordisrequiredinaprocedure,requestthepasswordfromtheuser,storeitinavariable,andthenusethevariableinyourcode.Forrecommendedbestpracticesonhowtodothis,seeSecurityNotesforMicrosoftOfficeSolutionDevelopers.
expression.MakeWeb(UserName,Password)
expressionAnexpressionthatreturnsaWebFolderobject.
UserNameOptionalString.Thelogonnameoftheuser.YoucanusethisoptiontocreateadefaultusernamefortheWebsite.
PasswordOptionalString.Thepasswordoftheuser.YoucanusethisoptiontocreateadefaultpasswordfortheWebsite.
![Page 334: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/334.jpg)
Example
ThisexamplecreatesanewWebsitefromanexistingfoldernamed"Distributors,"whichisafolderintheRogueCellarsWebsite.ThisexampleassumesthatthereisaWebsiteonyourlocalcomputernamedRogueCellarsthatcontainsafoldernamedDistributors.Alternatively,youcansubstituteadifferentWebsiteandfoldername.
PrivateSubMakeWeb()
DimmyWebAsWebEx
DimmyFolderAsWebFolder
SetmyWeb=Webs("C:\MyWebSites\RogueCellars")
myWeb.Activate
SetmyFolder=Active.RootFolder.Folders("Distributors")
myFolder.MakeWeb
EndSub
![Page 335: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/335.jpg)
ShowAll
![Page 336: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/336.jpg)
MoveMethod(WebObjectModel)MovemethodasitappliestotheWebFileandWebFolderobjects.
MovesthespecifiedobjectfromitscurrentlocationtoadesignatedURL.
expression.Move(DestinationUrl,UpdateLinks,ForceOverwrite)
expressionAnexpressionthatreturnsoneoftheaboveobjects.
DestinationUrlRequiredString.ThetargetURL,suchas"C:\MyDocuments\MyWebSites\AdventureWorks".
UpdateLinksRequiredBoolean.Truetoupdatelinksduringthemoveprocess.
ForceOverwriteRequiredBoolean.Truetooverwriteduplicatefilesorfolders.
MovemethodasitappliestotheNavigationNodeobject.
Movesanavigationnodefromonelocationtoanotherinthenavigationstructure.ReturnsaNavigationNodeobjectthatrepresentsthenodeafterithasbeenmoved.
expression.Move(NodeCollection,NewLeftSibling)
expressionAnexpressionthatreturnsaNavigationNodeobject.
NodeCollectionRequiredNavigationNodes.Thetargetnavigationcollection.
NewLeftSiblingOptionalVariant.Thenavigationnodethatwillprecedethenewnodeinthenavigationstructure.Ifitisnotspecified,thenodewillbecomethelastnodeinthetargetnodecollectionspecifiedintheNodeCollectionparameter.
![Page 337: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/337.jpg)
Example
AsitappliestotheWebFileobject.
Thefollowingstatementmovesafilefromonepositioninthefilestructuretoanother.
myFile.Move("C:\MyDocuments\MyWebSites\AdventureWorks\Images",_
True,False)
AsitappliestotheNavigationNodeobject.
Thefollowingexamplemovesanodefromthefifthpositioninthenavigationstructuretothefourthpositioninthenavigationstructurebydesignatingthethirdnodeasthenewleftsibling.
PrivateSubMoveNavNode()
DimmyNodesAsNavigationNodes
DimmyNodeAsNavigationNode
SetmyNodes=ActiveWeb.RootNavigationNode.Children
SetmyNode=myNodes(4)
myNode.Move(myNodes,2)
ActiveWeb.ApplyNavigationStructure
EndSub
![Page 338: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/338.jpg)
OnTimeMethodStartsabackgroundtimerthatrunsamacroonthespecifieddateatthespecifiedtime.
expression.OnTime(When,Name,Tolerance)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
WhenRequiredVariant.Thetimeatwhichthemacroistoberun.Canbeastringthatspecifiesatime(forexample,"4:30pm"or"16:30"),oritcanbeaserialnumberreturnedbyafunctionsuchasTimeValueorTimeSerial(forexample,TimeValue("2:30pm")orTimeSerial(14,30,00)).Youcanalsoincludethedate(forexample,"6/304:15pm"orTimeValue("6/304:15pm")).
UsethesumofthereturnvaluesoftheNowfunctionandeithertheTimeValueorTimeSerialfunctiontosetatimertorunamacroaspecifiedamountoftimeafterthestatementisrun.Forexample,useNow+TimeValue("00:05:30")torunamacro5minutesand30secondsafterthestatementisrun.
NameRequiredString.Thenameofthemacrotoberun.Usethecompletemacropathtoensurethatthecorrectmacroisrun(forexample,"Project.Module1.Macro1").Forthemacrotorun,thedocumentortemplatemustbeavailablebothwhentheOnTimemethodisrunandwhenthetimespecifiedbyWhenarrives.
ToleranceOptionalVariant.Themaximumtime(inseconds)thatcanelapsebeforeamacrothatwasn'trunatthetimespecifiedbyWheniscanceled.Macrosmaynotalwaysrunatthespecifiedtime.Forexample,ifadialogboxisbeingdisplayed,themacrowillbedelayeduntilMicrosoftFrontPagehascompletedthetask.Ifthisargumentis0(zero)oromitted,themacroisrunregardlessofhowmuchtimehaselapsedsincethetimespecifiedbyWhen.
![Page 339: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/339.jpg)
Remarks
MicrosoftFrontPagecanmaintainonlyonebackgroundtimersetbytheOnTimemethod.Ifyoustartanothertimerbeforeanexistingtimerruns,theexistingtimeriscanceled.
![Page 340: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/340.jpg)
Example
Thisexamplerunsthemacronamed"Macro1"inthecurrentmoduleat3:55P.M.
Application.OnTimeWhen:=Timevalue("15:55:00"),Name:="Macro1"
Thisexamplerunsthemacronamed"Macro1"15secondsfromthetimetheexampleisrun.Themacronameincludestheprojectandmodulename.
Application.OnTimeWhen:=Now+TimeValue("00:00:15"),_
Name:="Project1.Module1.Macro1"
Thisexamplerunsthemacronamed"Start"at1:30P.M.Themacronameincludestheprojectandmodulename.
![Page 341: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/341.jpg)
ShowAll
![Page 342: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/342.jpg)
OpenMethodOpenmethodasitappliestotheWebFileobject.
OpensafileinaWebsite.
expression.Open
expressionRequired.AnexpressionthatreturnsaWebFileobject.
OpenmethodasitappliestotheWebsobject.
OpensaWebsite.ReturnsaWebExobject.
expression.Open(szWebUrl,UserName,Password,WebOpenFlags)
expressionRequired.AnexpressionthatreturnsaWebsobject.
szWebUrlRequiredString.ThebaseURLoftheWebsite,suchas"C:\MyWebSites".ThiscanbeanyabsoluteURL,suchas"http://webserver"or"file://filesystem"fordisk-basedWebsites.
UserNameOptionalString.Thelogonnameoftheuser.
PasswordOptionalString.AdesignatedstringofcharacterstovalidateaccesstothespecifiedWebsite.
WebOpenFlagsOptionalFpWebOpenFlags.
NoteAvoidusinghard-codedpasswordsinyourapplications.Ifapasswordisrequiredinaprocedure,requestthepasswordfromtheuser,storeitinavariable,andthenusethevariableinyourcode.Forrecommendedbestpracticesonhowtodothis,seeSecurityNotesforMicrosoftOfficeSolutionDevelopers.
FpWebOpenFlagscanbeoneoftheseFpWebOpenFlagsconstants.fpOpenInWindowdefaultfpOpenNoWindow
![Page 343: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/343.jpg)
Example
ThefollowingexampleopenstheRogueCellarsWebsiteandtheOktoberfestSalefile,andperformsthefollowingtasks:
Addstexttothefilebycreatingapropertytoholdthetext.AccessesthePageobjectmodelusingtheActiveDocumentpropertyandtheinsertAdjacentTextmethod.AddstexttothepagebysubstitutingmySalePropforthetextparameterintheinsertAdjacentTextmethod.ClosesMicrosoftFrontPage.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\RogueCellars",oryoumaysubstituteanalternativeWebsiteURLandfilename.
PrivateSubAddSaleText()
DimobjWebAsWeb
DimobjFileAsWebFile
DimstrSalePropAsString
DimstrSaleTextAsString
strSaleText="VintageWinesforOktoberfestSale!!!"
SetobjWeb=Webs.Open("C:\MyDocuments\MyWebSites\RogueCellars")
SetobjFile=ActiveWeb.RootFolder.Files("Sale.htm")
objFile.Properties.Add"SaleText",mySaleText
strSaleProp=objFile.Properties("SaleText")
objFile.Open
ActiveDocument.body.insertAdjacentText"BeforeEnd",strSaleProp
WebWindows.Close
EndSub
![Page 344: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/344.jpg)
ShowAll
![Page 345: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/345.jpg)
PublishMethodPublishesaWebsitetoaWebserver.
expression.Publish(DestinationUrl,PublishFlags,UserName,Password)
expressionAnexpressionthatreturnsaWebExobject.
DestinationUrlRequiredString.AstringthatcontainstheentiretargetURLfortheWebsite,suchas“http://wwwroot/AdventureWorks”.ThiscanbeanyURLforaWebsite,suchashttp://webserver/folderorfile://filesystem/folderfordisk-basedWebsites.
PublishFlagsOptionalFpWebPublishFlags.
FpWebPublishFlagscanbeoneoftheseFpWebPublishFlagsconstants.fpPublishAddToExistingWebfpPublishCopyAllFilesfpPublishCopySubwebsfpPublishIncrementalfpPublishLogInTempDirfpPublishNoDeleteUnmatchedfpPublishUseLastPublishTimefpPublishNonedefault
UserNameOptionalString.ThenameoftheuserwhoispublishingtheWebsite.
PasswordOptionalString.Thepasswordoftheuser.
NoteAvoidusinghard-codedpasswordsinyourapplications.Ifapasswordisrequiredinaprocedure,requestthepasswordfromtheuser,storeitinavariable,andthenusethevariableinyourcode.Forrecommendedbestpracticesonhowtodothis,seeSecurityNotesforMicrosoftOfficeSolutionDevelopers.
![Page 346: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/346.jpg)
![Page 347: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/347.jpg)
Example
ThefollowingexamplepublishestheactiveWebsite.
NoteIftheWebsiteyouarepublishingtoisanexistingWebsite,youmustusetheargumentfpPublishAddToExistingWeb,otherwiseyourWebsitewon'tbepublished.IftheWebsiteyouarepublishingtodoesn'texist,don'tusethefpPublishAddToExistingWebargumentbecauseyourWebsitewon'tbepublished.
PrivateSubPublishMyWeb()
DimmyWebAsWebEx
DimmyBaseURLAsString
DimmyPublishParamAsFpWebPublishFlags
SetmyWeb=Application.ActiveWeb
myBaseURL="http://www.Adventure-Works.com"
myPublishParam=fpPublishAddToExistingWeb
myWeb.PublishmyBaseURL,myPublishParam
EndSub
![Page 348: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/348.jpg)
QuitMethodQuitstheapplication.ThismethoddoesnotsaveanychangesthathavenotbeenpreviouslysavedusingtheSaveorSaveAscommand,butimmediatelyexitstheactiveapplication.
expression.Quit
expressionAnexpressionthatreturnsanApplicationobject.
![Page 349: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/349.jpg)
Example
ThisexamplequitstheapplicationwithoutsavinganychangesthatweremadesincethepreviousSaveorSaveAscommandwasexecuted.
PrivateSubQuitApp()
Application.Quit
EndSub
![Page 350: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/350.jpg)
RecalcHyperlinksMethodRecalculatesallmetadataontheserverforthespecifiedWebsite.Thisoperationwillrebuildallhyperlinks,titlesforWebpages,themesonpages,andsooninaMicrosoftFrontPageWebsite.
NoteThisoperationmaytakealongtimetocompletedependingontheamountofmetadataontheserver.
expression.RecalcHyperlinks
expressionAnexpressionthatreturnsaWebExobject.
![Page 351: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/351.jpg)
Example
ThefollowingexamplerecalculatesthehyperlinksfortheactiveWebsite.
PrivateSubRecalcLinks()
DimmyWebAsWebEx
SetmyWeb=Application.ActiveWeb
myWeb.RecalcHyperlinks
EndSub
![Page 352: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/352.jpg)
ShowAll
![Page 353: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/353.jpg)
RefreshMethod(WebObjectModel)RefreshmethodasitappliestotheWebExobject.
RefreshesthespecifiedWebExobject.
expression.Refresh(FetchAll)
expressionRequired.AnexpressionthatreturnsaWebExobject.
FetchAllOptionalBoolean.Truetoretrieveallinformationforalldocumentsregardlessofview.WhensettoFalsethisargumentretrievesonlytheinformationnecessarytosupportthecurrentview.However,iftheReportsorHyperlinkviewisopen,Falserefreshesalldocuments.DefaultisFalse.
RefreshmethodasitappliestothePageWindowExobject.
Refreshesthespecifiedpagewithanoptiontosavechanges.
expression.Refresh(SaveChanges)
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
SaveChangesOptionalBoolean.Truetosavechanges.
![Page 354: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/354.jpg)
Example
ThefollowingstatementsrefreshtheactivepageandthefirstpageofthefirstWebsiteopened.
ActivePageWindow.Refresh
WebWindows(0).PageWindows(0).Refresh
Youcanusethefollowingstatementtosaveanychangesyoumayhavemadetotheactivepage.
ActivePageWindow.Refresh(True)
YoucanusethefollowingstatementstorefreshtheactiveWebsiteandthefirstWebsiteopened.
ActiveWeb.Refresh
Webs(0).Refresh
![Page 355: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/355.jpg)
ShowAll
![Page 356: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/356.jpg)
RemoveMethod(WebObjectModel)ReturnsaBooleanthatrepresentswhetheraspecifiedfilewassuccessfullyremovedfromaWebpackage.
expression.Remove(Url,flags)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
UrlRequiredString.ThepathandfilenameofthefiletoremovefromtheWebpackage.
flagsRequiredFpDependencyFlags.SpecifieswhichdependenciestoincludewhenremovingtheWebpackage.
FpDependencyFlagscanbeacombinationofoneormoreofthefollowingFpDependencyFlagsconstants.
fpDepsDefault Removesallimages,linkbars,hyperlinks,lists,sharedborders,andthemes.
fpDepsImages Removesallimages.fpDepsLinkbars Removesalllinkbars.fpDepsLinks Removesallpagestowhichtherearehyperlinks.
fpDepsLists Removesliststhatmaybeneededinorderforthepagetorendercorrectly.
fpDepsNone Removesnodependencies.fpDepsRecurse Removesallfilesthatareinaspecifiedfolder.fpDepsSharedBorders Removesallsharedborders.fpDepsThemes Removesallthemes.
![Page 357: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/357.jpg)
Example
ThefollowingexamplecreatesaWebpackageandaddsthreefilestoit,removesthelastfileaddedtothepackage,andthensavesthepackagetothelocaldrive.
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.AddobjWeb.Url&"/test2.htm",fpDepsNone
.AddobjWeb.Url&"/test3.htm",fpDepsImages
.RemoveobjWeb.Url&"/test3.htm",fpDepsImages
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 358: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/358.jpg)
RemoveChoiceMethodRemovesthespecifiedchoicefromthespecifiedfield.
expression.RemoveChoice(Index)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
IndexRequired.ALongthatrepresentsthepositionofthechoicewithinthearray.
![Page 359: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/359.jpg)
Example
ThefollowingexampleremovesthefirstchoicefromtheNewChoiceFieldfieldinthefirstlistoftheactiveWebsite.
SubRemoveChoice()
'Removesfirstchoicefromarray
DimobjAppAsFrontPage.Application
DimobjListFieldsAslistFields
DimobjListFieldAsListFieldChoice
SetobjApp=FrontPage.Application
SetobjListFields=objApp.ActiveWeb.Lists.Item(0).Fields
SetobjListField=objListFields.Item("NewChoiceField")
'Removefirstchoiceinlist
objListField.RemoveChoiceIndex:=0
EndSub
![Page 360: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/360.jpg)
RemoveWebMethodRemovesaWebsite.
expression.RemoveWeb(UserName,Password)
expressionAnexpressionthatreturnsaWebFolderobject.
UserNameOptionalString.Thelogonnameoftheuser.
PasswordOptionalString.Thepasswordoftheuser.
NoteAvoidusinghard-codedpasswordsinyourapplications.Ifapasswordisrequiredinaprocedure,requestthepasswordfromtheuser,storeitinavariable,andthenusethevariableinyourcode.Forrecommendedbestpracticesonhowtodothis,seeSecurityNotesforMicrosoftOfficeSolutionDevelopers.
![Page 361: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/361.jpg)
Remarks
TheRemoveWebmethodisthecomplementoftheMakeWebmethod.JustastheMakeWebmethodcreatesthemetadatafortheWebsitefromafolder,theRemoveWebmethodremovesthemetadatafortheWebsitefromafolder,butthefolderremainsintact.ThisisdifferentfromtheDeletemethodfortheWebExobject,wheretheentirecontentsofthespecifiedWebsiteareremoved.
![Page 362: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/362.jpg)
Example
ThefollowingexampleremovesaWebsitefromafolder.Thefolderanditscontentsremainintact,butthefolderisnolongeraWebsite.
NoteYoumusthavetheWebsitethatcontainsthefolderopen.
PrivateSubWebRemove()
DimmyFoldersAsWebFolders
DimmyFolderAsWebFolder
SetmyWebFolders=Webs(0).RootFolder.Folders
ForEachmyFolderInmyFolders
IfmyFolder.Name="TempWeb"Then
myFolder.RemoveWeb
ExitFor
EndIf
Next
EndSub
![Page 363: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/363.jpg)
RunMethodRunsthedesignatedMicrosoftVisualBasicmacro.YoucanusetheRunmethodtoexecuteaspecifiedprocedureinMicrosoftFrontPage.YoucanalsousetheRunmethodfromwithintheprocedureofanActiveXcontrolthatcarriesoutinstructionstoqueryormodifyaFrontPage-basedWebsite.
NoteYoucannotpassparameterstoaprocedureusingtheRunmethod.UsetheCallstatementtopassparameterstoaprocedure.
expression.Run(MacroName,safeArrayOfParams)
expressionAnexpressionthatreturnsanApplicationobject.
MacroNameRequiredString.Thenameofthemacro,add-in,orscript.
safeArrayOfParamsRequired.AParamArrayoftypeVariant.
![Page 364: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/364.jpg)
Example
Thefollowingexamplerunsamacrofromanotherprocedure.
NoteTorunthisexample,youmusthaveaWebsitenamedRogueCellarsoryoucansubstituteadifferentWebsiteinplaceoftheRogueCellarsWebsite.CopythefollowingproceduresintoacodemoduleandrunStartMacro.
PrivateSubStartMacro()
DimmyMacroAsString
myMacro="OpenRogueCellars"
Run(myMacro)
EndSub
SubOpenRogueCellars()
DimmyWebAsWeb
SetmyWeb=Webs.Open("C:\MyWebSites\RogueCellars")
EndSub
![Page 365: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/365.jpg)
ShowAll
![Page 366: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/366.jpg)
SaveMethodAsitappliestotheWebPackageobject.
SavesaWebpackagewiththespecifiedfilename.
expression.Save(strFileName,fOverWrite)
expressionRequired.AnexpressionthatreturnsaWebPackageobject.
strFileNameRequiredString.ThepathandfilenameoftheWebpackage.Webpackageshavean.fwpfilenameextension.TheSavemethoddoesnotautomaticallyincludethisfilenameextension,soyoushouldspecifyitaspartofthefilename.
fOverWriteRequiredLong.Falsetonotoverwriteanexistingfilewiththesamefilename.
AsitappliestothePageWindowExobject.
Savesaspecifiedpage.
expression.Save(ForceOverwrite)
expressionAnexpressionthatreturnsaPageWindowExobject.
ForceOverwriteOptionalBoolean.Falsetonotsaveoveranexistingfile.ThedefaultvalueisTrue.
![Page 367: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/367.jpg)
Example
AsitappliestotheWebPackageobject.
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"C:\MyDocuments\NewWebPackage.fwp",True
EndWith
AsitappliestothePageWindowExobject.
Thefollowingexamplecreatesaproperty,addsittoafile,andthensavesthepage.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\RogueCellars",oryoumaysubstituteanalternativeWebsiteURLandfilename.
PrivateSubAddSaleText()
DimmyWebAsWebEx
DimmyFileAsWebFile
DimmySalePropAsString
DimmySaleTextAsString
mySaleText="VintageWinesforOktoberfestSale!!!"
SetmyWeb=Webs.Open("C:\MyDocuments\MyWebSites\RogueCellars")
SetmyFile=ActiveWeb.RootFolder.Files("Sale.htm")
myFile.Properties.Add"SaleText",mySaleText
mySaleProp=myFile.Properties("SaleText")
![Page 368: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/368.jpg)
myFile.Open
ActiveDocument.body.insertAdjacentText"BeforeEnd",mySaleProp
ActivePageWindow.Save
WebWindows.Close
EndSub
![Page 369: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/369.jpg)
SaveAsMethodWritesthespecifiedpageobjecttothedestinationURL.
expression.SaveAs(DestinationUrl,ForceOverwrite)
expressionAnexpressionthatreturnsaPageWindowExobject.
DestinationUrlRequiredString.AstringthatcontainstheentireURLfortheWebsite,suchas“C:\MyDocuments\MyWebSites\AdventureWorks\index.htm”.ThiscanbeanyURLforaWebsite,suchashttp://webserver/folder/fileorfile://filesystem/folder/filefordisk-basedWebsites.
ForceOverwriteOptionalBoolean.Falsetonotsaveoveranexistingfile.ThedefaultvalueisTrue.
![Page 370: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/370.jpg)
Example
ThefollowingexamplesavesanexistingfiletoanotherWebsiteunderanewname.(Itisn'tnecessarytochangethenameofthefile.)TheprogramfirstactivatesthecontainerWebsite,andthenitopensthefileandsavesittoadifferentWebsitewithanewname.
NoteYoumusthaveafilenamedZinfandel.htmintheC:\MyWebSitesfolder,orchangethenameofthefileintheprogramtomatchanexistingfileinyourWebsite.
PrivateSubSaveAsNewFile()
DimmyFileAsWebFile
DimmyPageWindowAsPageWindowEx
Webs("C:\MyWebSites").Activate
SetmyFile=ActiveWeb.RootFolder.Files("Zinfandel.htm")
myFile.Open
SetmyPageWindow=ActivePageWindow
myPageWindow.SaveAs("C:\MyWebSites\RogueCellars\ZinfandelSale.htm")
myPageWindow.Close
EndSub
![Page 371: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/371.jpg)
ShowAll
![Page 372: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/372.jpg)
SaveReportMethodSavesaspecifiedreporttoanHTMLfileontheuser'scomputer.
expression.SaveReport(reportviewModeEx,DestinationUrl,Title,ForceOverwrite)
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
reportviewModeExRequired.AnFpWebViewModeExconstantthatrepresentsthetypeofreportyouwanttosave.
FpWebViewModeExcanbeoneoftheseFpWebViewModeExconstants.fpWebViewExAllFilesfpWebViewExAssignedTofpWebViewExBrokenLinksfpWebViewExBrowserTypesfpWebViewExCategoriesfpWebViewExCheckoutStatusfpWebViewExComponentErrorsfpWebViewExDailyPageHitsfpWebViewExDailySummaryfpWebViewExFoldersfpWebViewExLinksfpWebViewExMonthlyPageHitsfpWebViewExMonthlySummaryfpWebViewExNavigationfpWebViewExOlderFilesfpWebViewExOsTypesfpWebViewExPagefpWebViewExPublishStatusfpWebViewExRecentlyAddedFilesfpWebViewExRecentlyChangedFiles
![Page 373: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/373.jpg)
fpWebViewExReferringDomainsfpWebViewExReferringURLsfpWebViewExReviewStatusfpWebViewExSearchStringsfpWebViewExSiteSummaryfpWebViewExSlowPagesfpWebViewExTodofpWebViewExUnlinkedFilesfpWebViewExUsageSummaryfpWebViewExVisitingUsersfpWebViewExWeeklyPageHitsfpWebViewExWeeklySummary
DestinationUrlRequired.AStringthatrepresentsthetargetfilenameforthereport.
TitleRequired.AStringthatrepresentsthetitleofthenewreport.
ForceOverwriteOptional.ABooleanthatindicatesifanypreviouslycreatedreportwiththesamefilenamewillbeoverwrittenbythenewreport.IfTrue,anexistingfilewillbeoverwritten.ThedefaultvalueisTrue.
![Page 374: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/374.jpg)
Example
ThefollowingexamplesavesareportofallfilesinthecurrentWebsitetoafilenamedReport1.htmonthelocaluser'scomputer.Thereportwilloverwriteanyexistingreportinthe\Reportsdirectorywiththename"Report1.htm".
SubReportSave()
'Savesaspecifiedreporttoaspecifiedlocation.
DimobjAppAsFrontPage.Application
DimobjWebwdwAsWebWindowEx
SetobjApp=FrontPage.Application
SetobjWebwdw=objApp.ActiveWebWindow
'Savethereport
objWebwdw.SaveReportreportviewModeEx:=fpWebViewExAllFiles,_
Title:="CurrentProjectProgress",_
DestinationURL:="C:\NewProject\Reports\Report1.htm",_
ForceOverwrite:=True
EndSub
![Page 375: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/375.jpg)
SetChoicesMethodSetthechoicesforafieldoftypechoicetotheitemsindicatedintheppsaChoicesargument.
expression.SetChoices(ppsaChoices)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ppsaChoicesRequiredString.Anarrayofitemsthatrepresentthechoicesinthelistfield.
![Page 376: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/376.jpg)
ShowBordersShadingDialogMethodDisplaystheBordersandShadingdialogboxandreturnsaStringthatrepresentstheCascadingStyleSheetpropertysettingsforthebordersandshadingpropertiesselectedintheBordersandShadingdialogbox.AvalueisreturnedwhentheusersclicksOK.IftheuserclicksCancel,anemptyStringisreturned.
expression.ShowBordersShadingDialog(strCSSIn)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
strCSSInOptionalVariant.AStringthatrepresentstheinitialcustomsettingsforthedialogbox.
![Page 377: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/377.jpg)
Example
ThefollowingexampledisplaystheBordersandShadingdialogbox,andthensetstheborderstylefortheactiveelementtothebordersettingsreturned.
DimstrCSSAsString
DimstrCSSInAsString
strCSSIn="border:3double#00FFFF"
strCSS=Application.ShowBordersShadingDialog(strCSSIn)
IfstrCSS<>""ThenActiveDocument.activeElement_
.Style.Border=strCSS
![Page 378: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/378.jpg)
ShowFontDialogMethodDisplaystheFontdialogboxandreturnsaStringthatrepresentstheCascadingStyleSheetpropertiesforthefontpropertiesselectedintheFontdialogbox.AvalueisreturnedwhentheusersclicksOK.IftheuserclicksCancel,anemptyStringisreturned.
expression.ShowFontDialog(strCSSIn)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
strCSSInOptionalVariant.AStringthatrepresentstheinitialcustomsettingsforthedialogbox.
![Page 379: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/379.jpg)
Example
ThefollowingexampledisplaystheFontdialogbox,andthensetsthefontstylefortheactiveelementtothefontsettingsreturned.
DimstrCSSAsString
DimstrCSSInAsString
strCSSIn="font-size:14pt;color:#FF0000"
strCSS=Application.ShowFontDialog(strCSSIn)
IfstrCSS<>""ThenActiveDocument_
.activeElement.Style.Font=strCSS
![Page 380: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/380.jpg)
ShowHTMLDialogMethodDisplaysacustomdialogboxbyusingthecontentsofanHTMLpage.ReturnsaVariant.
expression.ShowHTMLDialog(Url,pVarArgIn)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
UrlRequiredString.Thepathandfilenameofthepagetorenderasadialogbox.
pVarArgInOptionalVariant.Datausedtosettheinitialsettingsofthecustomdialogbox.
![Page 381: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/381.jpg)
Example
ThefollowingexampledisplaysthespecifiedWebpageinaMicrosoftWindowsdialogbox.
Application.ShowHTMLDialog("c:\test.htm")
![Page 382: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/382.jpg)
ShowHyperlinkParametersMethodDisplaystheHyperlinkParameterdialogboxandreturnsaStringthatrepresentsthehyperlinkplustheparameters,separatedbyaquestionmark.
expression.ShowHyperlinkParameters(bstrPath,bstrQuery,bstrColumns,bstrColTypes)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
bstrPathRequiredString.SpecifiestheWebaddressforthehyperlink.
bstrQueryRequiredString.Specifiesthequerystringtopassinwhenopeningthelinkedpage.
bstrColumnsRequiredString.Specifiesacomma-delimitedStringthatcontainsthenamesofthedatabasecolumnsthatareavailableforuseintheURL.
bstrColTypesRequiredString.Specifiesacomma-delimitedStringthatrepresentsthedatatypevaluesofthedatabasecolumns.
![Page 383: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/383.jpg)
Remarks
ThevaluesforthebstrColTypesparameterincludethefollowing.
Datatype Value Description
adArray 819 Whencombinedwithanotherdatatype,indicatesanarrayoftheotherdatatype.
adBigInt 20 Indicatesan8-bytesignedinteger.adBinary 128 Indicatesabinaryvalue.adBoolean 11 IndicatesaBooleanvalue.adBSTR 8 Indicatesanull-terminatedcharacterstring.
adChapter 136 Indicatesa4-bytechaptervaluethatidentifiesrowsinachildrowset.
adChar 129 Indicatesastringvalue.
adCurrency 6Indicatesacurrencyvalue.Currencyisafixed-pointnumberwithfourdigitstotherightofthedecimalpointandisstoredinaneight-bytesignedinteger.
adDate 7
Indicatesadatevalue.Adatevalueisstoredasadouble,thewholepartofwhichisthenumberofdayssinceDecember30,1899,andthefractionalpartofwhichisthefractionofaday.
adDBDate 133 Indicatesadatevalue(yyyymmdd).adDBTime 134 Indicatesatimevalue(hhmmss).
adDBTimeStamp 135 Indicatesadate/timestamp(yyyymmddhhmmssplusafractioninbillionths).
adDecimal 14 Indicatesanexactnumericvaluewithafixedprecisionandscale.
adDouble 5 Indicatesadouble-precisionfloating-pointvalue.adEmpty 0 Indicatesnovalue.adError 10 Indicatesa32-biterrorcode.
adFileTime 64 Indicatesa64-bitvaluerepresentingthenumberof100-nanosecondintervalssinceJanuary1,1601.
adGUID 72 Indicatesagloballyuniqueidentifier(GUID).
![Page 384: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/384.jpg)
adIDispatch 9 IndicatesapointertoanIDispatchinterfaceonaCOMobject.(ADOdoesnotcurrentlysupportthisdatatype.Usagemaycauseunpredictableresults.)
adInteger 3 Indicatesa4-bytesignedinteger.
adIUnknown 13IndicatesapointertoanIUknowninterfaceonaCOMobject.(ADOdoesnotcurrentlysupportthisdatatype.Usagemaycauseunpredictableresults.)
adLongVarBinary 205 Indicatesalongbinaryvalue.adLongVarChar 201 Indicatesalongstringvalue.adLongVarWChar 203 Indicatesalongnull-terminatedUnicodevalue.
adNumeric 131 Indicatesanexactnumericvaluewithafixedprecisionandscale.
adPropVariant 138 IndicatesanAutomationPROPVARIANT.adSingle 4 Indicatesasingle-precisionfloatingpoint.adSmallInt 2 Indicatesa2-bytesignedinteger.adTinyInt 16 Indicatesa1-bytesignedinteger.adUnsignedBigInt 21 Indicatesan8-byteunsignedinteger.adUnsignedInt 19 Indicatesa4-byteunsignedinteger.adUnsignedSmallInt 18 Indicatesa2-byteunsignedinteger.adUnsignedTinyInt 17 Indicatesa1-byteunsignedinteger.adUserDefined 132 Indicatesauser-definedvariable.adVarBinary 204 Indicatesabinaryvalue.adVarChar 200 Indicatesastringvalue.
adVariant 12IndicatesanAutomationVariant.(ADOdoesnotcurrentlysupportthisdatatype.Usagemaycauseunpredictableresults.)
adVarNumeric 139 Indicatesanumericvalue.adVarWChar 202 Indicatesanull-terminatedUnicodecharacterstring.adWChar 130 Indicatesanull-terminatedUnicodecharacterstring.
FormoreinformationonActiveXdatatypes,seeActiveXDataObject(ADO)ontheMicrosoftDeveloperNetwork(MSDN)Website.
![Page 385: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/385.jpg)
Example
ThefollowingexampledisplaystheHyperlinkParameterdialogboxwiththefollowingURLandsettings.
Application.ShowHyperlinkParameters"http://www.fourthcoffee.com/coffee.asp",_
"type=black","CategoryID,CategoryName,Description","3,202,202"
![Page 386: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/386.jpg)
ShowImportWebPackageDialogMethodReturnsaBooleanthatindicateswhetherthemethodsuccessfullyaddedthespecifiedWebpackage.
expression.ShowImportWebPackageDialog(packageFileName,urlImportedTo)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
packageFileNameRequiredString.ThepathandfilenameoftheWebpackagetoimport.
urlImportedToRequiredString.ThepathandfilenameofwheretoimporttheWebpackage.
![Page 387: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/387.jpg)
Remarks
YoucanimportWebpackagesonlyintoWebsitesbasedonMicrosoftWindowsSharePointServices.
![Page 388: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/388.jpg)
Example
ThefollowingexampledisplaystheImportWebPackagedialogbox,andthenindicateswhetherthespecifiedWebpackagewasaddedsuccessfullytothespecifiedWebsite.
DimblnResponseAsBoolean
blnResponse=Application.ShowImportWebPackageDialog_
("c:\NewWebPackage.fwp",ActiveWeb.Url)
IfblnResponse=TrueThen
MsgBox"TheWebpackagewasaddedsuccessfully."
Else
MsgBox"UnabletoaddtheWebpackagetothespecifiedsite."_
&vbCrLf&"Contactyouradministratorforassistance."
EndIf
![Page 389: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/389.jpg)
ShowPickURLDialogMethodDisplaysthetheEditHyperlinkdialogboxandreturnsaStringthatrepresentstheURLtothefilethattheuserhasselectedintheEditHyperlinkdialogbox.
expression.ShowPickURLDialog(strBaseURL,strFileURL)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
strBaseURLOptionalVariant.ThebaseURLfortheresultinghyperlink.
strFileURLOptionalVariant.Theselectedpageforanewhyperlink.TheusermaychangethisbyselectingadifferentpageintheEditHyperlinkdialogbox.
![Page 390: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/390.jpg)
Example
ThefollowingexampledisplaysthetheEditHyperlinkdialogbox.
DimstrURLAsString
DimobjSelectionAsIHTMLTxtRange
DimstrHyperlinkAsString
strURL=Application.ShowPickURLDialog_
(ActiveWeb.Url,"c:\test.htm")
SetobjSelection=ActiveDocument.selection.createRange
WithobjSelection
strHyperlink="<ahref="""&strURL&""">"&.Text&"</a>"
.pasteHTMLstrHyperlink
EndWith
![Page 391: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/391.jpg)
ShowPositionDialogMethodReturnsaStringthatrepresentsthevalueofthepositionattributeforacascadingstylesheet.
expression.ShowPositionDialog(strCSSIn)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
strCSSInOptionalVariant.AStringthatrepresentstheinitialcustomsettingsforthedialogbox.
![Page 392: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/392.jpg)
Example
Thefollowingexamplesetsthepositionattributefortheactiveelementintheactivedocument.NotethatusingthesetAttributemethodoverwritesanyotherstyleattributesettingsfortheactiveelement.
DimstrCSSAsString
DimstrCSSInAsString
strCSSIn="position:absolute;left:750"
strCSS=Application.ShowPositionDialog(strCSSIn)
IfstrCSS<>""ThenActiveDocument.activeElement_
.setAttribute"style",strCSS
![Page 393: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/393.jpg)
SplitArgsMethodReturnsaVariantthatrepresentsanarrayoftheindividualitemsinthespecifiedstringseparatedbythespecifiedcharacterstring.
expression.SplitArgs(String,Tokens)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
StringRequiredString.Thestringcontainingthedata.
TokensRequiredString.ThecharacterstringthatseparatestheitemsintheStringparameter.
![Page 394: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/394.jpg)
Remarks
TheSplitArgsmethodissimilartotheSplitfunctioninMicrosoftVisualBasic;however,theSplitArgsmethodwillnotbreakquote-delimitedstrings.
![Page 395: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/395.jpg)
Example
Thefollowingexamplesplitsthespecifiedstringintoanarrayoftheitemsinthespecifiedstringthatareseparatedbyacomma.
DimvarArray()AsVariant
varArray=Application.SplitArgs("this,isa,test",",")
![Page 396: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/396.jpg)
UndoCheckoutMethodReturnsthespecifiedfiletoitspriorstateinthesourcecontrolprojectwithoutsavinganychangesthatmayhavebeenmade.
NoteYoumusthaveasourcecontrolprojectinplacebeforeusingthismethod.Forinformationaboutsourcecontrolprojects,refertoManagingSourceControlProjects.
expression.UndoCheckout
expressionAnexpressionthatreturnsaWebFileobject.
![Page 397: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/397.jpg)
Example
Thefollowingexamplechecksafileintoitspriorstate(itsstatebeforecheckout).Thefilemustbepartofasourcecontrolproject.
NoteTorunthisprocedure,youmusthaveasourcecontrolprojectinplacewithaWebsiteopenandapagecalledZinfandel.htmcontainedintheWebsite.Or,substituteanalternateWebsiteandfilename.
PrivateSubUndoCheckout()
DimmyWebAsWebEx
SetmyWeb=("C:/MyWebSites/RogueCellars")
myWeb.RootFolder.Files("Zinfandel.htm").UndoCheckout
EndSub
![Page 398: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/398.jpg)
UpdateDynamicTemplateMethodUpdatesthepagesthatareattachedtoaDynamicWebTemplatesothatanychangestotheDynamicWebTemplateareappliedtopagesthatreferencetheDynamicWebTemplate.
expression.UpdateDynamicTemplate(type,pbzLog)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
pStateRequiredDynamicTemplateState.SpecifiestheregionmappingtousewhenupdatingtheDynamicWebTemplate.UsetheSetHeadMappingandSetBodyMappingmethodsoftheDynamicTemplateStateobjecttocustomizeregionmapping.
pbzLogRequiredString.AByRefparameterthatreturnsaStringcontainingthelogentryabouttheupdateprocessforafile.Inthecaseofanerror,itreturnsinformationthatindicateswhichfileshavefailed.
![Page 399: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/399.jpg)
Remarks
Ifanerroroccurs,theupdateprocesswillterminateunlesstheSkipOnQuerypropertyissettoTrue.
![Page 400: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/400.jpg)
Example
ThefollowingexampleupdatestheDynamicWebTemplatereferencesinthespecifiedfile.
DimobjStateAsDynamicTemplateState
DimobjFileAsWebFile
DimstrLogAsString
SetobjState=Application.CreateDynamicTemplateState
SetobjFile=ActiveWeb.LocateFile("home.htm")
objFile.UpdateDynamicTemplateobjState,strLog
![Page 401: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/401.jpg)
VerifyAllLinksMethodVerifiesallhyperlinksinthespecifiedWebsite.
NoteTheBrokenHyperlinksreportusestheVerifyAllLinksmethodtodisplayanypageswithbrokenhyperlinks.
expression.VerifyAllLinks
expressionRequired.AnexpressionthatreturnsaWebWindowExobject
![Page 402: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/402.jpg)
Example
ThefollowingexampleusestheVerifyAllLinksmethodtocheckforbrokenlinksintheactiveWebsite,andthenswitchestotheBrokenHyperlinksreportview.
SubVerifyLinks()
'Verifiesbrokenlinksinthecurrentview
DimobjAppAsFrontPage.Application
DimobjWebwdwAsWebWindowEx
SetobjApp=FrontPage.Application
SetobjWebwdw=objApp.ActiveWebWindow
'Verifyalllinksinthecurrentweb.
objWebwdw.VerifyAllLinks
EndSub
![Page 403: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/403.jpg)
ActiveDocumentPropertyReturnsanFPHTMLDocumentobjectthatrepresentstheWebpagecurrentlydisplayedintheMicrosoftFrontPageapplicationwindow.
expression.ActiveDocument
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 404: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/404.jpg)
Remarks
ThisobjectprovidesaccesstotheMicrosoftFrontPagePageObjectModelelementsthatarecompatiblewithMicrosoftInternetExplorer4.0andlater.ThisobjectmodelprovidesprogrammaticaccesstotheHTMLinthespecifiedpage.
![Page 405: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/405.jpg)
Example
ThefollowingstatementreturnstheactivedocumentinFrontPage.
myDoc=Application.ActiveDocument
Thefollowingstatementreturnstheactivedocumentforthespecifiedpagewindow.
myDoc=Application.WebWindows(0).PageWindows(0).ActiveDocument
![Page 406: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/406.jpg)
ActiveFrameWindowPropertyReturnsanFPHTMLWindow2objectthatrepresentsthedocumentdisplayedintheactivepagewindow.
NoteIftheactivepagecontainsframes,theActiveFrameWindowpropertyreturnsthecurrentlyselectedframe,ifoneisselected,ortheframespageitself,ifnoneoftheframesisselected.Ifapagedoesnotcontainframes,theActiveFrameWindowpropertyreturnsthewindowcontainingthespecifiedpage.
expression.ActiveFrameWindow
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
NoteAccessingtheActiveFrameWindowpropertyisthesameasaccessingtheparentwindowthroughtheactivepagewindowasfollows:
ActivePageWindow.Document.parentWindow
![Page 407: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/407.jpg)
Example
ThefollowingexampleretrievestheActiveFrameWindowobject.
PrivateSubGetActiveFrame()
DimmyPageWindowAsPageWindowEx
DimmyFrameAsFPHTMLWindow2
SetmyPageWindow=_
ActiveWeb.ActiveWebWindow.ActivePageWindow
SetmyFrame=myPageWindow.ActiveFrameWindow
EndSub
![Page 408: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/408.jpg)
ActivePageWindowPropertyReturnsaPageWindowExobjectthatrepresentsthewindowinwhichthecurrentpageisdisplayed.
expression.ActivePageWindow
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 409: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/409.jpg)
Example
ThefollowingexamplereturnsthePageWindowExobjectfortheApplicationobject.
PrivateSubGetActivePageWindow()
DimmyPageWindowAsPageWindowEx
SetmyPageWindow=ActivePageWindow
EndSub
ThefollowingexamplereturnsthePageWindowExobjectfromtheWebWindowExobject.
PrivateSubGetActivePageWindow()
DimmyPageAsPageWindowEx
SetmyPage=ActiveWebWindow.ActivePageWindow
EndSub
![Page 410: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/410.jpg)
ActiveWebPropertyReturnsaWebExobjectthatrepresentstheWebsitecurrentlyopeninMicrosoftFrontPage.
expression.ActiveWeb
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 411: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/411.jpg)
Remarks
TheMicrosoftFrontPageVisualBasicforApplicationsobjectmodelprovidesaccesstotheWebobjectmodelthroughtheActiveWebproperty.FormoreinformationabouttheFrontPageobjectmodels,seeExploringtheObjectModelinFrontPage.
![Page 412: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/412.jpg)
Example
ThisexampleusestheActiveWebpropertytolocatetheWebpageindex.htmandchangesthebackgroundcolorofthepage.
NoteTorunthisexample,createaformwithonecommandbuttoncalledcmdActiveWebColorChangeandpastethefollowingcodeinthecodewindow.YoumusthaveaWebpagecalledindex.htmforthisproceduretochangethebackgroundcolor.
PrivateSubcmdActiveWebBKGRDColorChange_Click()
DimmyPageWinAsPageWindowEx
SetmyPageWin=Application.ActiveWeb.LocatePage("index.htm")
myPageWin.Document.bgColor="PapayaWhip"
EndSub
NoteMicrosoftVisualBasicprovidescolorconstantswitha"vb"prefix,suchasvbCyan.FrontPagebuildsWebpagesinHTML,whichusesdifferentcolorconstantsthanVisualBasic.IfyouusethecolorconstantsprovidedwithVisualBasicinyourexistingprograms,youmayneedtochangethesetotheequivalenthexadecimalcolorvalueswhenyouportyourprogramstoaFrontPage-basedWebsite,orwhenyouusecolorsacrossMicrosoftOfficeapplicationsthatincludeaFrontPage-basedWebsite.
![Page 413: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/413.jpg)
ActiveWebWindowPropertyReturnsaWebWindowExobjectthatrepresentsthewindowinwhichthecurrentlyopenWebsiteisdisplayed.
expression.ActiveWebWindow
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 414: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/414.jpg)
Example
ThisexampleprintsthevalueoftheActiveDocument.nameProppropertyfortheWebExobject.
NoteTorunthisexample,createaformwithacommandbuttoncalled"cmdActiveWebWindowDisplay"andalabelcalled"lblWebWindowDisplay".Pastethefollowingcodeinthecodewindow.YoumusthaveaMicrosoftFrontPage-basedWebpageopenforthisproceduretoreturnadocumentname.
PrivateSubcmdActiveWebWindowDisplay_Click()
OnErrorResumeNext
DimmyCurrentWebWindowAsWebWindowEx
SetmyCurrentWebWindow=Application.ActiveWebWindow
WithmyCurrentWebWindow
lblWebWindowDisplay.Caption=.ActiveDocument.nameProp
EndWith
EndSub
![Page 415: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/415.jpg)
AllFilesPropertyReturnsaWebFilescollectionthatrepresentsallfilesinthespecifiedWebsite.
expression.AllFiles
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 416: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/416.jpg)
Remarks
TheWebFilescollectionreturnsallfilesinthecollectionregardlessoftheirpositionintheWebsitehierarchy.
![Page 417: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/417.jpg)
Example
ThefollowingexamplesearchesthroughthefilesintheactiveWebsiteforapagewiththetitle"MainPage."Ifthepageisfound,itisopenedinMicrosoftFrontPage.
SubFindFileTitle()
'ReturnsacollectionofallfilesinthecurrentWebsite.
DimobjAppAsFrontPage.Application
DimobjWebFileAsWebFile
DimobjWebFilesAsWebFiles
SetobjApp=FrontPage.Application
'CreateareferencetotheWebFilescollection.
SetobjWebFiles=objApp.ActiveWeb.AllFiles
'CheckeachfileinthecollectionforthetitleMainPage.
ForEachobjWebFileInobjWebFiles
'Ifthetitleisfoundopenthepageintheeditor.
IfobjWebFile.Title="MainPage"Then
objWebFile.Open
EndIf
'Ifnotfound,checknextfile.
NextobjWebFile
EndSub
![Page 418: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/418.jpg)
AllFoldersPropertyReturnsaWebFolderscollectionthatrepresentsallfoldersinthecurrentWebsite.
expression.AllFolders
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 419: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/419.jpg)
Remarks
TheWebFolderscollectionreturnsallfoldersinthecollectionregardlessoftheirpositionintheWebsitehierarchy.
![Page 420: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/420.jpg)
Example
ThefollowingexamplesearchesthroughtheWebFolderscollectionforafoldernamed"Folder1."Ifthefolderisfound,theexamplesearchesforafilewiththetitle"MainPage."Ifthetitleisfound,thefileisopenedinMicrosoftFrontPage.
SubWebFoldersFind()
DimobjAppAsFrontPage.Application
DimobjWebFolderAsWebFolder
DimobjWebFoldersAsWebFolders
SetobjApp=FrontPage.Application
'CreateareferencetotheWebFolderscollection.
SetobjWebFolders=objApp.ActiveWeb.AllFolders
'Checkeachfolderinthecollectionforthename"Folder1".
ForEachobjWebFolderInobjWebFolders
'Ifthefolderisfoundthensearchthrougheach
'fileinthefolderforafilewiththetitle
'MainPageandopenthefileifitexists.
IfobjWebFolder.Name="Folder1"Then
Fori=1ToobjWebFolder.Files.Count
IfobjWebFolder.Files.Item(i).Title="MainPage"Then
objWebFolder.Files.Item(i).Open
ExitFor
EndIf
Nexti
EndIf
'Ifnotfoundchecknextfile.
NextobjWebFolder
EndSub
![Page 421: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/421.jpg)
AllNavigationNodesPropertyReturnsaNavigationNodescollectionobjectthatrepresentsallofthenavigationnodesinthespecifiedWebsite.
NoteNavigationnodesareusedtodisplayagraphicrepresentationofthecurrentWebsiteinNavigationview.
expression.AllNavigationNodes
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 422: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/422.jpg)
Example
ThefollowingexamplereturnsareferencetotheNavigationNodescollectionanddisplaysthefilenameofthefirstobjectinthecollectionandthetitleoftheWebsiteinwhichitexists.
SubAllNavigationNodes()
DimobjAppAsFrontPage.Application
DimobjNavNodeAsNavigationNode
DimobjNavNodesAsNavigationNodes
SetobjApp=FrontPage.Application
'CreateareferencetotheNavigationNodescollection.
SetobjNavNodes=objApp.ActiveWeb.AllNavigationNodes
'Returnareferencetothefirstnodeinthecollection.
SetobjNavNode=objNavNodes.Item(0)
'DisplaythefilenameandtheWebofthefirst
'navigationnodeinthecollection
MsgBox"TheURLofthisfileis"&objNavNode.Url&_
vbCr&".Itisfoundinthe"_
&objNavNode.Web.Title&"Website."
EndSub
![Page 423: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/423.jpg)
AllowAttachmentsPropertySetsorreturnsaBooleanthatrepresentswhetheralistallowsallowsattachments.
expression.AllowAttachments
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 424: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/424.jpg)
AllowFillInChoicesPropertySetsorreturnsaBooleanthatrepresentswhetherachoicefieldallowsuserstoenteracustomchoice.
expression.AllowFillInChoices
expressionRequired.AnexpressionthatreturnsaListFieldChoiceobject.
![Page 425: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/425.jpg)
AllowModeratePropertySetsorreturnsaBooleanthatrepresentswhethertoallowusingthemoderationsettinginalist.
expression.AllowModerate
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 426: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/426.jpg)
AllowMultipleResponsesPropertyReturnsorsetsaBooleanthatdetermineswhetheruserscanrespondmorethanoncetoagivensurvey.IfFalse,ausercanonlyrespondoncetoasurvey.
expression.AllowMultipleResponses
expressionRequired.AnexpressionthatreturnsaSurveyobject.
![Page 427: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/427.jpg)
Example
ThefollowingexamplesetstheAllowMultipleResponsespropertyofallSurveyobjectsintheactiveWebsitetoFalsesothatuserscanonlyrespondoncetoagivensurvey.
SubChangeResponses()
'Setsnumberofresponsestooneperuser.
DimobjAppAsFrontPage.Application
DimobjListAsObject
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Cyclethrougheachlistandcheckforlisttype.
ForEachobjListInobjLists
'Ifit'saSurveythenchangeresponsestosingle.
IfobjList.Type=fpListTypeSurveyThen
objList.AllowMultipleResponses=False
EndIf
Next
EndSub
![Page 428: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/428.jpg)
AllowRichHTMLPropertySetsorreturnsaBooleanthatrepresentswhethertodisplaytheRichTextFormat(RTF)editcontrolinthebrowser.
expression.AllowRichHTML
expressionRequired.AnexpressionthatreturnsaListFieldMultiLineobject.
![Page 429: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/429.jpg)
AllowsLongFilenamesPropertyReturnsTrueiftheoperatingsystemonthemachinewheretheWebsiteresidesacceptslongfilenames.Read-onlyBoolean.
expression.AllowsLongFilenames
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 430: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/430.jpg)
Example
ThefollowingexamplecheckswhethertheactiveWebsiteallowslongfilenames.TheexampleassumestheexistenceofaprocedurenamedConvertLongFilenames.
IfActiveWeb.AllowsLongFilenames=TrueThen
ExitSub
Else
CallConvertLongFilenames()
EndIf
![Page 431: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/431.jpg)
AnswerWizardPropertySomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
ReturnsanAnswerWizardobjectthatcontainsthefilesusedbytheHelpsearchengine.
expression.AnswerWizard
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 432: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/432.jpg)
Example
ThisexampleaddsanAnswerWizardfileandretrievestheCreatorandCountproperties.
NoteTheCreatorpropertyforMicrosoftFrontPageisdifferentfromtheCreatorpropertyusedbyotherMicrosoftOfficeobjects,suchastheAnswerWizardobject.TheCreatorpropertyforFrontPageusesastringformat,whileOfficeobjectsusea32-bitintegertoidentifytheapplicationthatcreatedthefile.Inthisexample,you'llnotethattheCreatorpropertyreturnsa32-bitintegerratherthantheFrontPagestringformatbecausetheAnswerWizardobjectisanOfficesharedobject.Formoreinformation,usetheObjectBrowserforalllibrariesorMicrosoftVisualBasicHelptoviewmoredetailedinformationabouttheCreatorpropertyforMicrosoftOfficeobjects.
PrivateSubGetAnswerWizardInfo()
DimmyAWAsAnswerWizard
DimmyAWFilesAsAnswerWizardFiles
DimmyAWCountAsInteger
DimmyAWCreatorAsString
SetmyAW=ActiveWeb.Application.AnswerWizard
SetmyAW=myAW.Files
WithmyAWFiles
myAWCreator=.Creator
.Add("myAWFile")
myAWCount=.Count
EndWith
EndSub
![Page 433: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/433.jpg)
ApplicationPropertyReturnsanApplicationobjectthatrepresentstheMicrosoftFrontPageapplication.
expression.Application
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 434: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/434.jpg)
Example
TheapplicationnamecanbedirectlyaccessedfromtheobjectsandcollectionsintheFrontPageobjectmodel.ThisstatementshowstheFrontPageapplicationaccessedfromtheFilescollection.
SetcurrApp=ActiveWeb.RootFolder.Files.Application
![Page 435: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/435.jpg)
AssistantPropertySomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
ReturnsanAssistantobjectthatrepresentstheMicrosoftOfficeAssistant.Read-only.
expression.Assistant
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 436: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/436.jpg)
Example
ThefollowingexamplereturnsareferencetotheMicrosoftOfficeAssistantandmodifiesitsproperties.ThesubroutinedisplaystheAssistantonthescreen,turnsanimationsoundson,andsetstheMoveWhenInTheWaypropertytoTrue.TheAssistantwillnowmovetoanotherlocationonthescreenifitisintheuser'sway.
SubfpAsst()
'CreatesareferencetotheOfficeAssistantandmodifiesitsproperties
DimobjAppAsFrontPage.Application
DimobjAsstAsAssistant
SetobjApp=FrontPage.Application
'ReturnareferencetotheOfficeAssistant
SetobjAsst=objApp.Assistant
WithobjAsst
'Makeassistantvisible
.Visible=True
'Allowsoundsduringanimations
.Sounds=True
'MovetheAssistantoutofthewaywhenneeded
.MoveWhenInTheWay=True
EndWith
EndSub
![Page 437: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/437.jpg)
AuthorPropertySetsorreturnsaStringthatrepresentsthenameoftheauthorwhocreatedaWebpackage.
expression.Author
expressionRequired.AnexpressionthatreturnsaWebPackageobject.
![Page 438: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/438.jpg)
Example
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 439: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/439.jpg)
BuildPropertyReturnsthebuildnumberforthespecifiedobject.Read-onlyString.
expression.Build()
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 440: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/440.jpg)
Remarks
IftheApplicationobjectisspecified,theBuildpropertyreturnsthebuildnumberoftheapplication.WhentheSystemobjectisspecified,thispropertyreturnsthebuildnumberoftheoperatingsystem.Forexample,theformatusedontheAboutdialogboxforanapplicationmightlooklikethis:“Version:4.0.0.xxxx,”wherexxxxisthebuildnumberoftheapplication.WhentheBuildpropertyfortheSystemobjectisaccessed,itreturnsthecurrentbuildoftheoperatingsystemasyoumightseeusedonthePropertiespageoftheSystemdialogbox.
![Page 441: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/441.jpg)
Example
Thefollowingstatementreturnsthebuildnumberoftheapplication.
myAppBuild=Application.Build
Youcanaccessthesystembuildasshowninthefollowingstatement.
mySysbuild=System.Build
![Page 442: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/442.jpg)
CaptionPropertyReturnsaStringthatrepresentseitherthecaptiontextinthetitlebarortheURLofapage.
expression.Caption
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 443: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/443.jpg)
Remarks
TheCaptionpropertyreturnsdifferentvaluesdependingontheobject.Forexample,theCaptionpropertyforthePageWindowExobjectreturnsthefileURLoftheopenpage,whiletheCaptionpropertyfortheWebWindowExobjectreturnsthetextofthetitlebarfortheMicrosoftFrontPageapplicationwindow.
![Page 444: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/444.jpg)
Example
Thisstatementreturnsthecaptionoftheactivepage.
myCaption=ActivePageWindow.Caption
ThefollowingexampledemonstratesaccessingboththeactiveWebWindowExandPageWindowExobjectsusingtheWithandForstatements.
PrivateSubGetPageWindowCaption()
DimmyWebWindowAsWebWindowEx
DimmyPageWindowsAsPageWindows
DimmyPageWindowCaptionsAsString
DimmyWebWindowCaptionAsString
SetmyWebWindow=Application.ActiveWebWindow
SetmyPageWindows=myWebWindow.PageWindows
WithmyWebWindow
myWebWindowCaption=.Caption
EndWith
ForEachmyPageWindowInmyPageWindows
myPageWindowCaptions=myPageWindowCaptions&myPageWindow.Caption
Next
EndSub
![Page 445: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/445.jpg)
CheckedoutByPropertyReturnsaStringthatrepresentsthelogonnameofthepersontowhomthespecifiedfileischeckedout.
NoteYoumusthaveasourcecontrolprojectinplacebeforeusingthismethod.
expression.CheckedoutBy
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 446: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/446.jpg)
Example
Thisexampleretrievesthelogonaliasofthepersonwhocheckedoutthefile.
NoteYoumusthaveasourcecontrolprojecttorunthisexample.
PrivateSubGetCheckedOutBy()
DimmyCheckedOutAliasAsString
myCheckedOutAlias=_
ActiveWeb.RootFolder.Files(0).CheckedoutBy
EndSub
![Page 447: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/447.jpg)
ChildrenPropertyReturnsaNavigationNodescollectionthatrepresentsthecollectionofchildnodesforanavigationnode.
expression.Children
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 448: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/448.jpg)
Example
Thefollowingexamplereturnsthenumberofchildnodesthatexistdirectlybelowthehomepagenavigationnode.
PrivateSubGetChildrenCount()
DimmyCountAsInteger
myCount=ActiveWeb.HomeNavigationNode.Children.Count
EndSub
![Page 449: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/449.jpg)
ChoicesPropertyReturnsorsetsaStringthatrepresentsanarrayofallchoicesinthecurrentfield.
expression.Choices
expressionRequired.AnexpressionthatreturnsaListFieldChoiceobject.
![Page 450: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/450.jpg)
Example
Thefollowingexampledisplaysthetextforallchoicesinthefield"NewChoiceField."Ifthefieldcontainsnochoices,amessageisdisplayedtotheuser.Thefield"NewChoiceField"isanobjectoftypeListFieldChoice.
SubViewChoices()
'Displaysthechoicesinthecurrentfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjFldChoiceAsListFieldChoice
DimVarChoicesAsVariant
DimstrChoiceAsString
DimblnFoundAsBoolean
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Referencechoicefield
SetobjFldChoice=objLstFlds.Item("NewChoiceField")
blnFound=False
ForEachVarChoiceInobjFldChoice.Choices
IfstrChoice=""Then
'iffirstvalueinstring
strChoice=VarChoice&vbCr
'Thelistcontainsatleastonechoice
blnFound=True
Else
'addvaluetostring
strChoice=strChoice&VarChoice&vbCr
EndIf
NextVarChoice
IfblnFound=TrueThen
'Displaychoices
MsgBox"Thecurrentlistcontainsthefollowingchoices:"&_
vbCr&strChoice
Else
'Displaymessagetouser
MsgBox"Thecurrentfieldcontainsnochoices."
EndIf
EndSub
![Page 451: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/451.jpg)
![Page 452: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/452.jpg)
COMAddInsPropertyReturnsaCOMAddInscollectionthatrepresentsalltheComponentObjectModel(COM)add-inscurrentlyloadedinMicrosoftFrontPage.ThesearelistedintheCOMAdd-Insdialogbox(Add-InscommandontheToolsmenu).
expression.COMAddIns
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 453: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/453.jpg)
Remarks
AlloftheFrontPageadd-insthatareregisteredintheMicrosoftWindowsRegistryarelocatedunderthefollowingkey:
HKEY_CURRENT_USER\Software\Microsoft\Office\version\FrontPage\AddIns
Add-insdesignedforadministratorsareregisteredunder:
HKey_Local_Machine\Software\Microsoft\Office\version\FrontPage\Addins
![Page 454: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/454.jpg)
Example
Thefollowingexamplereturnsthenumberofadd-insavailabletoFrontPage.
PrivateSubGetCOMAddIns()
DimmyWebAsWebEx
DimmyAddinCountAsInteger
SetmyWeb=ActiveWeb
myAddinCount=Application.COMAddIns.Count
EndSub
![Page 455: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/455.jpg)
CommandBarsPropertyReturnsaCommandBarscollectionthatrepresentsthemenuandtoolbarsdisplayedinMicrosoftFrontPage.
expression.CommandBars
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 456: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/456.jpg)
Remarks
Youcan'taccessFrontPage-specificpop-upshortcutmenususingtheCommandBarscollection.Forexample,youcan'taccesstheshortcutmenuthatappearswhenyouright-clickapageinPageview.However,youcancreateyourownpop-upshortcutmenususingtheShowPopupmethodfortheCommandBarobject.
![Page 457: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/457.jpg)
Example
Thefollowingthreeproceduressetupanewmenuitemonatoolbar.
Procedure1
SubAddMenuItem()
DimnewMenuAsCommandBarControl
DimtoolsMenuAsCommandBar
SettoolsMenu=Application.CommandBars("Tools")
SetnewMenu=_
toolsMenu.Controls.Add(msoControlButton,,,,True)
newMenu.Caption="New&MenuItem"
EndSub
Thefollowingprocedureconnectstheclickeventtothecustombuttonandmustbeaddedtoaclassorformmodule.Themoduleshownisaformmodule.ThisprocedureaddsanewitemtotheToolsmenuandconnectstheeventsofthecustombuttonbyassigningthevariablee_NewMenu(usedintheWithEventsstatement)tothecustombuttonvariablenewMenu.
Procedure2
PrivateSubAddButton_Click()
DimnewMenuAsCommandBarControl
DimWithEventse_NewMenuAsCommandBarButton
SubAddMenuItemWithEventHook()
DimtoolsMenuAsCommandBar
SettoolsMenu=Application.CommandBars("Tools")
SetnewMenu=_
toolsMenu.Controls.Add(msoControlButton,,,,True)
Sete_NewMenu=newMenu
newMenu.Caption="New&MenuItem"
EndSub
PrivateSube_NewMenu_Click(ByValCtrlAs_
Office.CommandBarButton,CancelDefaultAsBoolean)
MsgBox"MenuItemClicked"
Ctrl.Caption="Clicked"
![Page 458: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/458.jpg)
EndSub
ToexecuteFrontPagecustommenuitemsusingtheCommandBarscollection,indexthemenuitemandcalltheexecutemethodforthatitem.ThefollowingexampleinsertsaMicrosoftOfficespreadsheetcontrolattheinsertionpoint.
Procedure3
SubExecuteMenu()
DimIAsString
DimCAsString
DimOAsString
I="Insert"
C="C&omponent"
O="OfficeSp&readsheet"
CommandBars(I).Controls(C).Controls(O).Execute
EndSub
ThefollowingexamplereturnsthestatusofvariouspropertiesofthecommandbarsintheactiveWebsite.
PrivateSubGetCommandBars()
DimmyWebAsWebEx
DimmyCBAsObject
DimmyCBCountAsInteger
DimmyDisplayFontsAsBoolean
DimmyDisplayKeysInToolTipsAsBoolean
DimmyLargeButtonsAsBoolean
DimmyMenuAnimationStyleAsString
SetmyWeb=ActiveWeb
SetmyCB=Application.CommandBars
WithmyCB
myCBCount=.Count
myDisplayFonts=.DisplayFonts
myDisplayKeysInToolTips=.DisplayKeysInTooltips
myLargeButtons=.LargeButtons
myMenuAnimationStyle=.MenuAnimationStyle
EndWith
EndSub
Thefollowingexampleisatoolthatiteratesthroughthecommandbarsandreturnsseveralpropertiesfromeachmenu.
![Page 459: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/459.jpg)
NoteTorunthisexample,createaformthathasatextboxcalledtxtComBarandacommandbuttoncalledcmdComBar,andcopythefollowingcodetothecodewindow.
PrivateSubcmdComBar_Click()
DimmyWebAsWebEx
DimmyComBarsAsObject
DimmyComBarAsObject
DimmyTextAsString
DimmyNameAsString
DimmyAdaptMenuAsString
DimmyEnabledMenuAsString
DimmyMenuHeightAsString
DimmyMenuWidthAsString
SetmyWeb=ActiveWeb
SetmyComBars=Application.CommandBars
myName="Name:"
myAdaptMenu="MenuAdaptive?"
myEnabledMenu="MenuEnabled?"
myMenuHeight="MenuHeight:"
myMenuWidth="MenuWidth:"
txtComBar.Locked=True
txtComBar.maxLength=10000
txtComBar.MultiLine=True
txtComBar.ScrollBars=fmScrollBarsVertical
WithmyComBars
ForEachmyComBarInmyComBars
WithmyComBar
myText=myText&myName&.Name&vbCrLf
myText=myText&myAdaptMenu&.AdaptiveMenu&vbCrLf
myText=myText&myEnabledMenu&.Enabled&vbCrLf
myText=myText&myMenuHeight&.Height&vbCrLf
myText=myText&myMenuWidth&.Width&vbCrLf
txtComBar.Text=myText
EndWith
Next
txtComBar.SetFocus
txtComBar.CurLine=0
EndWith
EndSub
![Page 460: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/460.jpg)
![Page 461: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/461.jpg)
CompanyPropertySetsorreturnsaStringthatrepresentsthenameofthecompanythatcreatedaWebpackage.
expression.Company
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 462: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/462.jpg)
Example
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 463: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/463.jpg)
ComputationFormulaPropertySetsorreturnsaStringthatrepresentstheformulausedtogetavalueforacalculatedfield.
expression.ComputationFormula
expressionRequired.AnexpressionthatreturnsaListFieldComputedobject.
![Page 464: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/464.jpg)
ShowAll
![Page 465: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/465.jpg)
ConnectionSpeedPropertyReturnsorsetsanFpConnectionSpeedvaluethatindicatestheuser'sInternetconnectiontype.
FpConnectionSpeedcanbeoneoftheseFpConnectionSpeedconstants.fpConnect14414400baud-ratemodemfpConnect28828800baud-ratemodemfpConnect56K56600baud-ratemodemfpConnectISDNISDNconnectionfpConnectT1T1connectionfpConnectT3T3connection
expression.ConnectionSpeed
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 466: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/466.jpg)
Remarks
TheConnectionSpeedpropertyisusedinconjunctionwiththeSlowPagepropertytodeterminethesimulateddownloadtimeofaWebpage.ThedefaultvalueisfpConnect144.
![Page 467: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/467.jpg)
Example
ThefollowingexamplesetstheConnectionSpeedpropertytofpConnect56K,simulatinga56Kmodem.Theamountoftimeafiletakestodownloadandthecriteriausedtodeterminea"slow"pageintheReportsviewwillbebasedonthisvalue.
SubSpeedOfConnection()
'ModifiestheConnectionSpeedproperty
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
WithobjApp
'Settheconnectiontypeto56Kmodem
.ConnectionSpeed=fpConnect56K
EndWith
EndSub
![Page 468: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/468.jpg)
CountPropertyReturnsthenumberofitemsinthespecifiedcollection.Read-onlyVariant.
expression.Count
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 469: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/469.jpg)
Remarks
Somecollectionsare0-basedandsomeare1-based.TheCountpropertyforcollectionsbeginswith1eventhoughyouaccessthefirstiteminacollectionwitha0.
![Page 470: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/470.jpg)
Example
ThefollowingexamplereturnsthenumberofthemesandfoldersintheactiveWebsite.
PrivateSubGetWebCount()
DimmyWebAsWebEx
DimmyCountAsInteger
SetmyWeb=ActiveWeb
WithmyWeb
myThemeCount=.Themes.Count
myFolderCount=.RootFolder.Folders.Count
EndWith
EndSub
![Page 471: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/471.jpg)
CreatorPropertyReturnsaStringthatrepresentsthenameoftheapplicationinwhichthisobjectwascreated.IftheobjectwascreatedinMicrosoftFrontPage,thispropertyreturnstheString"FrontPage.Editor.Document".
NoteTheCreatorpropertyforFrontPageisdifferentfromtheCreatorpropertyusedbyotherMicrosoftOfficeobjects.TheCreatorpropertyforFrontPageusesastringformat,whileOfficeobjectsusea32-bitintegertoidentifytheapplicationthatcreatedthefile.
expression.Creator
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 472: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/472.jpg)
Example
ThisexamplechecksifthecreatorofafileisFrontPage.
PrivateSubGetCreator()
DimmyCreatorAsString
myCreator=ActiveWeb.RootFolder.Files(0).Creator
IfmyCreator<>"FrontPage.Editor.Document"Then
MsgBox"ThisfilewasnotcreatedbyFrontPage."
EndIf
EndSub
![Page 473: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/473.jpg)
ShowAll
![Page 474: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/474.jpg)
CurrencyPropertyReturnsorsetsanFpCurrencyFieldFormatenumeratedconstantthatdeterminesthetypeofcurrencytobeusedinthecurrencyfield.Read/write.
FpCurrencyFieldFormatcanbeoneoftheseFpCurrencyFieldFormatconstants.fpCurrencyFieldArgentinafpCurrencyFieldAustraliafpCurrencyFieldAustriafpCurrencyFieldBelgiumBFfpCurrencyFieldBelgiumFBfpCurrencyFieldBoliviafpCurrencyFieldBrazilfpCurrencyFieldCanadafpCurrencyFieldCanadaFfpCurrencyFieldChilefpCurrencyFieldColombiafpCurrencyFieldCostaRicafpCurrencyFieldCzechfpCurrencyFieldDenmarkfpCurrencyFieldDominicanRepublicfpCurrencyFieldEcuadorfpCurrencyFieldElSalvadorfpCurrencyFieldEurofpCurrencyFieldEuroPostfixfpCurrencyFieldFinlandfpCurrencyFieldFrancefpCurrencyFieldGermanyfpCurrencyFieldGreecefpCurrencyFieldGuatemalafpCurrencyFieldHonduras
![Page 475: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/475.jpg)
fpCurrencyFieldHongKongfpCurrencyFieldHungaryfpCurrencyFieldIrelandfpCurrencyFieldItalyfpCurrencyFieldJapanfpCurrencyFieldKoreafpCurrencyFieldMexicofpCurrencyFieldNetherlandsfpCurrencyFieldNewZealandfpCurrencyFieldNicaraguafpCurrencyFieldNorwayfpCurrencyFieldPanamafpCurrencyFieldParaguayfpCurrencyFieldPerufpCurrencyFieldPolandfpCurrencyFieldPortugalfpCurrencyFieldPRChinafpCurrencyFieldRussiafpCurrencyFieldSingaporefpCurrencyFieldSlovakiafpCurrencyFieldSloveniafpCurrencyFieldSouthAfricafpCurrencyFieldSpainfpCurrencyFieldSwedenfpCurrencyFieldSwitzerlandfpCurrencyFieldTaiwanfpCurrencyFieldTurkeyfpCurrencyFieldUnitedKingdomfpCurrencyFieldUnitedStatesfpCurrencyFieldUruguayfpCurrencyFieldVenezuela
expression.Currency
![Page 476: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/476.jpg)
expressionRequired.AnexpressionthatreturnsaListFieldCurrencyobject.
![Page 477: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/477.jpg)
Remarks
Thedefaultvalueforthisfieldisdeterminedbytheuser'ssystemsettings.
![Page 478: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/478.jpg)
Example
ThefollowingexamplecreatesanewfieldoftypefpFieldCurrencyandchangesthedefaultcurrencysettingtodisplayCanadian.
SubCreateCurrencyField()
'AddnewCurrencyfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjFldChoiceAsListFieldCurrency
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewCurrencyField"
'AddnewFieldoftypefpFieldCurrencytolist
objLstFlds.AddName:=strName,Description:="NewChoicevalueField",_
Fieldtype:=fpFieldCurrency,Required:=True
SetobjFldChoice=objLstFlds.Item("NewCurrencyField")
'ChangecurrencytypetoCanadian
objFldChoice.Currency=fpCurrencyFieldCanada
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&"."
EndSub
![Page 479: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/479.jpg)
DefaultTextPropertySetsorreturnsaStringthatrepresentsthedefaultvalueforahyperlinkfield,whichistheURLandthetextdisplayedtextforthehyperlink.
expression.DefaultText
expressionRequired.AnexpressionthatreturnsaListFieldURLobject.
![Page 480: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/480.jpg)
DefaultValuePropertyReturnsorsetsaVariantthatdefinesthedefaultvalueofthefield.Read/write.
expression.DefaultValue
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 481: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/481.jpg)
Remarks
Thedefaultvalueofallpre-populatedfieldsisEmpty.
![Page 482: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/482.jpg)
Example
Thefollowingexampledisplaysthenamesofallfieldsinthelistandtheirassociateddefaultvalues.IftheactiveWebsitedoesnotcontainanylists,amessageisdisplayedtotheuser.
SubFieldDefaultValue()
'Displaythedefaultvalueofthefield
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
'Displayfieldsinfirstlistofcollection
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
IfstrType=""Then
'iffirstvalueinstring
strType=objField.Name&"-"&_
objField.DefaultValue&vbCr
Else
'addvaluetostring
strType=strType&objField.Name&"-"&_
objField.DefaultValue&vbCr
EndIf
NextobjField
MsgBox"Thenamesofthefieldsinthislistandtheirdefault"&_
"valuesare:"&vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 483: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/483.jpg)
DefaultViewPagePropertyReturnsorsetsaStringthatdefinestherelativeURLtothepagethatisviewedwhenthelistisopened.ThispropertycorrespondstothedefaultviewpagefieldontheSupportingFilestabofthePropertiesdialogbox.
expression.DefaultViewPage
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 484: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/484.jpg)
Remarks
ThedefaultstartpageisAllItems.htm.
![Page 485: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/485.jpg)
Example
ThefollowingexampleliststhenamesofalllistsinthedocumentandtheircorrespondingdefaultviewpageURLs.Thesubroutinecreatesasinglestringcontainingalllistnamesanddefaultviewpagesanddisplaystheformattedmessagetotheuser.
SubViewDefaultPage()
'Letstheuserviewthedefaultview
'pageforalllistsintheweb.
DimlstWebListAsList
DimstrURLAsString
IfNotActiveWeb.ListsIsNothingThen
'Cyclethroughlists
ForEachlstWebListInActiveWeb.Lists
'adddefaultviewpagesnamestostring
IfstrURL=""Then
strURL=lstWebList.Name&"-"&_
lstWebList.DefaultViewPage&vbCr
Else
strURL=strURL&lstWebList.Name&"-"&_
lstWebList.DefaultViewPage&vbCr
EndIf
Next
'Displaydefaultviewpagesofalllists
MsgBox"Thedefaultviewpagesofalllistsinthecurrentwebare:"_
&vbCr&vbCr&strURL
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
![Page 486: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/486.jpg)
DescriptionPropertyReturnsorsetsaStringthatrepresentsthedescriptionforthecurrentlist.Thedescriptionappearsbelowthetitleofthelistonthedefaultviewpage.Read/write.
expression.Description
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 487: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/487.jpg)
Example
Thefollowingexamplepromptstheusertoenteradescriptionforthefirstlistinthecollection,andthenchangestheDescriptionpropertybasedontheuser'sinput.
SubSetDescription()
'Setthelistdescription
DimobjAppAsFrontPage.Application
DimobjWebAsWebEx
DimlstWebListAsList
DimStrDescAsString
SetobjApp=FrontPage.Application
SetobjWeb=objApp.ActiveWeb
'Referencefirstlistincollection
SetlstWebList=objWeb.Lists.Item(0)
'Getnewdescriptionfromuser
StrDesc=InputBox("Enteranewdescriptionforthelist"&_
lstWebList.Name&".")
'Setdescriptionproperty
lstWebList.Description=StrDesc
EndSub
![Page 488: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/488.jpg)
ShowAll
![Page 489: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/489.jpg)
DesignSecurityPropertyReturnsorsetsanFpListDesignSecurityconstantthatdefinesthesecuritypermissionsoftheList.
FpListDesignSecuritycanbeoneoftheseFpListDesignSecurityconstants.fpListDesignSecurityCreatorOnlythecreatorofthelisthaspermissiontomodifyit.fpListDesignSecurityEveryoneAllusershavepermissiontomodifythelist.
expression.DesignSecurity
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 490: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/490.jpg)
Example
ThefollowingexamplechangesthesecuritymodeofeachBasicListobjectinthecurrentweb.ThesubroutinechangestheDesignSecuritypropertytofpListDesignSecurityEveryoneifitisn'talreadyset.Oncethepropertyisset,alluserscaneditthedesignsettingsofBasicListobjectsinthecurrentweb.
NoteUsetheApplyChangesmethodtosaveanychangesmadetothelist.
SubSetSecurityType()
'ChangessecuritytypeofallBasicLists.
DimobjAppAsFrontPage.Application
DimobjListAsList
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Cyclethrougheachlistandcheckforlisttype
ForEachobjListInobjLists
'Ifit'saBasicListthanchangepermissions
IfobjList.Type=fpListTypeBasicListThen
IfobjList.DesignSecurity<>_
fpListDesignSecurityEveryoneThen
objList.DesignSecurity=_
fpListDesignSecurityEveryone
EndIf
objList.ApplyChanges
EndIf
Next
EndSub
![Page 491: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/491.jpg)
DisplayFormPropertyReturnsorsetsaStringthatrepresentstherelativeURLoftheformthatcontainstheuserinterfaceassociatedwiththelist.Read/write.
expression.DisplayForm
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 492: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/492.jpg)
Example
ThefollowingexampledisplaysthenamesofalllistsintheactiveWebsiteandtherelativeURLsoftheirassociatedWebforms.
SubViewFormURL()
'DisplaystheURLoftheform
'associatedwiththelist
DimlstWebListAsList
DimstrURLAsString
IfNotActiveWeb.ListsIsNothingThen
'CyclethroughlistsandaddURLstostring
ForEachlstWebListInActiveWeb.Lists
IfstrURL=""Then
strURL=lstWebList.Name&"-"&_
lstWebList.DisplayForm&vbCr
Else
strURL=strURL&lstWebList.Name&"-"&_
lstWebList.DisplayForm&vbCr
EndIf
Next
'DisplayURLsofallformsinWebsite
MsgBox"TherelativeURLsoftheformsare:"_
&vbCr&vbCr&strURL
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 493: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/493.jpg)
ShowAll
![Page 494: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/494.jpg)
DisplayFormatPropertyDisplayFormatpropertyasitappliestotheListFieldChoiceobject.
ReturnsorsetsanFpChoiceFieldFormatenumeratedconstantthatrepresentsthetypeofuserinterfacecontrolusedbythefield.Read/write.
FpChoiceFieldFormatcanbeoneoftheseFpChoiceFieldFormatconstants.fpChoiceFieldDropdownfpChoiceFieldRadioButtons
expression.DisplayFormat
expressionRequired.AnexpressionthatreturnsaListFieldChoiceobject.
DisplayFormatpropertyasitappliestotheListFieldDateTimeobject.
ReturnsorsetsanFpDateTimeFieldFormatenumeratedconstantthatrepresentsthewayinwhichthedateandtimevaluesaredisplayed.Read/write.
FpDateTimeFieldFormatcanbeoneoftheseFpDateTimeFieldFormatconstants.fpDateTimeFieldDateAndTimefpDateTimeFieldDateOnlyfpDateTimeFieldTimeOnly
expression.DisplayFormat
expressionRequired.AnexpressionthatreturnsaListFieldDateTimeobject.
DisplayFormatpropertyasitappliestotheListFieldNumberobject.
ReturnsorsetsanFpNumberFieldFormatenumeratedconstantthatdeterminesthewayinwhichnumbersaredisplayedintheList.Read/write.
![Page 495: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/495.jpg)
FpNumberFieldFormatcanbeoneoftheseFpNumberFieldFormatconstants.fpNumberFieldAutoThenumberwillbeautomaticallyformatted.fpNumberFieldFiveDecimalsThenumberwillbedisplayedwithfivedecimalplaces.fpNumberFieldFourDecimalsThenumberwillbedisplayedwithfourdecimalplaces.fpNumberFieldIntegerThenumberwillbedisplayedasanintegerwithnodecimalplaces.fpNumberFieldOneDecimalThenumberwillbedisplayedwithonedecimalplace.fpNumberFieldThreeDecimalsThenumberwillbedisplayedwiththreedecimalplaces.fpNumberFieldTwoDecimalsThenumberwillbedisplayedwithtwodecimalplaces.
expression.DisplayFormat
expressionRequired.AnexpressionthatreturnsaListFieldNumberobject.
DisplayFormatpropertyasitappliestotheListFieldURLobject.
ReturnsorsetsanFpURLFieldFormatenumeratedconstantthatrepresentstheimage-linkinginformation.Read/write.
FpURLFieldFormatcanbeoneoftheseFpURLFieldFormatconstants.fpURLFieldImagefpURLFieldLink
expression.DisplayFormat
expressionRequired.AnexpressionthatreturnsaListFieldURLobject.
![Page 496: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/496.jpg)
Example
AsitappliestotheListFieldChoiceobject.
ThefollowingexamplechangesthedisplaytypeofafieldnamedNewChoiceFieldinthefirstlistoftheactiveWebsite.Thechoiceswillnowbedisplayedinadrop-downlist.
SubChangeViewFormat()
'Changethedisplaytypeofthefield
DimobjAppAsFrontPage.Application
DimobjListFieldsAsListFields
DimobjListFieldAsListFieldChoice
SetobjApp=FrontPage.Application
SetobjListFields=objApp.ActiveWeb.Lists.Item(0).Fields
SetobjListField=objListFields.Item("NewChoiceField")
'ChangedisplayformattoDropDownlist
objListField.DisplayFormat=fpChoiceFieldDropdown
EndSub
![Page 497: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/497.jpg)
DocumentProperty(WebObjectModel)ReturnsanFPHTMLDocumentobject,providingaccesstothePageobjectmodelinMicrosoftFrontPagethatiscompatiblewithMicrosoftInternetExplorer4.0andlater.FormoreinformationonthePageobjectmodel,seeExploringtheObjectModelinFrontPage.
expression.Document
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
![Page 498: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/498.jpg)
Example
ThefollowingexampleopensapageandusestheinsertAdjacentTextmethodtoaddtexttothedocument.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\RogueCellars"thatcontainsafilenamedSales.htm.YoumaysubstituteanalternativeWebsiteURLorfilename.
PrivateSubAddTextToDoc()
DimmyWebAsWebEx
DimmyPageWindowAsPageWindowEx
DimmyTextAsString
SetmyWeb=_
Webs.Open("C:\MyDocuments\MyWebSites\RogueCellars")
myWeb.Activate
myText="WinterSaleBeginsNovember1st!"
SetmyPageWindow=_
ActiveWeb.RootFolder.Files("Sales.htm").Edit
myPageWindow.Document.body.insertAdjacentText_
"BeforeEnd",myText
ActivePageWindow.Save
ActiveWeb.Close
EndSub
![Page 499: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/499.jpg)
DownloadTimePropertyReturnsaLongthatrepresentsthesimulatedamountoftime(inseconds)agivenfilewilltaketodownload.Read-only.
expression.DownloadTime
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 500: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/500.jpg)
Remarks
ThispropertyisusedinconjunctionwiththeConnectionSpeedpropertytodeterminewhichfileswillappearintheSlowPagesreport.
![Page 501: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/501.jpg)
Example
ThefollowingexampledisplaysthenamesofallfilesinthecurrentWebsitewithadownloadtimegreaterthanaspecifiedvalue.Thesubroutinepromptstheusertoenteradownloadtimeinseconds.ItthensearchesthrougheachfileintheAllcollectionanddisplaysthenamesofanyfilewithadownloadtimegreaterthanthespecifiednumberofseconds.TheNamepropertyvalueisaddedtoaStringcontainingthenamesofallmatchingfilesinthecollection.TheString,storedinthevariablestrName,isthendisplayedtotheuser.IfnomatchingfilesarefoundintheWebsite,amessageisdisplayedtotheuser.
SubDownloadTime()
'Displaysthenamesofallfileswithadownloadtimegreaterthan
'agivenvalue
DimobjAppAsFrontPage.Application
DimobjwebFileAsWebFile
DimobjWebFielsAsWebFiles
DimstrSecAsString'Userinputvalue
DimstrNamesAsString'Nameofallmatchingfiles
DimblnFoundAsBoolean'Booleanflag
SetobjApp=FrontPage.Application
SetobjWebFiles=objApp.ActiveWeb.AllFiles
blnFound=False
'Promptusertoenterinput
strSec=InputBox("Enterthenumberofsecondsdownloadtime.")
'Searchthrougheachfileinthecollection
ForEachobjwebFileInobjWebFiles
'Ifuserinputislessthandownloadtime
IfstrSec<objwebFile.DownloadTimeThen
blnFound=True
IfstrName=""Then
strName=strName&objwebFile.Name
Else
'Otherwiseaddnextfilenametostring
strName=strName&","&vbCr&objwebFile.Name
EndIf
EndIf
NextobjwebFile
IfblnFound=TrueThen
'Displaynamesofallfilesthatmatchthecriteria
MsgBox"Thefilesthattakelongerthan"&_
strSec&"secondstodownloadare:"&vbCr&vbCr&_
![Page 502: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/502.jpg)
strName&"."
Else
'Nofiles,displaymessage
MsgBox"Therearenofilesthatmatchyourcriteria."
EndIf
EndSub
![Page 503: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/503.jpg)
DynamicTemplatePropertyReturnsaStringthatrepresentsreturnsthepathandfilenameofaDynamicWebTemplate.AnemptyStringindicatesthatnoDynamicWebTemplateisattached.
expression.DynamicTemplate
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 504: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/504.jpg)
Remarks
Ifanerroroccurs,theupdateprocesswillterminateunlesstheSkipOnQuerypropertyissettoTrue.
![Page 505: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/505.jpg)
Example
ThefollowingexampleupdatestheDynamicWebTemplateforeachfileintheactiveWebsiteifaDynamicWebTemplateisattached.
DimobjStateAsDynamicTemplateState
DimobjFileAsWebFile
DimstrLogAsString
SetobjState=Application.CreateDynamicTemplateState
ForEachobjFileInActiveWeb.AllFiles
IfobjFile.DynamicTemplate<>""Then_
objFile.UpdateDynamicTemplateobjState,strLog
Next
![Page 506: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/506.jpg)
EditFormPropertyReturnsorsetsaStringthatrepresentstherelativeURLoftheformusedforeditingthecurrentlistinMicrosoftFrontPage.Theeditformallowsyoutomodifythecolumnsinthecurrentlist.Read/write.
expression.EditForm
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 507: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/507.jpg)
Remarks
ThedefaultfilenameisEditForm.htm.
![Page 508: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/508.jpg)
Example
ThefollowingexampledisplaysthenamesofalllistsintheactiveWebsiteandtherelativeURLoftheirassociatededitforms.
SubViewEditFormURL()
'DisplaystheURLoftheform
'associatedwitheditingthelist
DimlstWebListAsList
DimstrURLAsString
IfNotActiveWeb.ListsIsNothingThen
'CyclethroughlistsandaddURLstostring
ForEachlstWebListInActiveWeb.Lists
IfstrURL=""Then
strURL=lstWebList.Name&"-"&_
lstWebList.EditForm&vbCr
Else
strURL=strURL&lstWebList.Name&"-"&_
lstWebList.EditForm&vbCr
EndIf
Next
'DisplayURLsofalleditingformsinWebsite
MsgBox"TherelativeURLsoftheeditingformsare:"_
&vbCr&vbCr&strURL
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 509: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/509.jpg)
ShowAll
![Page 510: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/510.jpg)
EditSecurityPropertyReturnsorsetsanFpListEditSecurityconstantthatdetermineswhichuserscaneditthecurrentlist.
FpListEditSecuritycanbeoneoftheseFpListEditSecurityconstants.fpListEditSecurityAllAlluserscaneditthelist.fpListEditSecurityNoneNouserscaneditthelist.fpListEditSecurityOnlyOwnUserscanonlyedittheirownlists.
expression.EditSecurity
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 511: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/511.jpg)
Example
ThefollowingexamplechangestheeditpermissionsofalllistsoftypefpListTypeBasicListtofpListEditSecurityOnlyOwn.Oncethepropertyisset,userscaneditonlyliststhattheyhavecreated.
NoteUsetheApplyChangesmethodtosaveanychangesmadetothelist.
SubChangeEditPermissions()
'ChangesthepermissionsofallBasicListsintheweb
DimobjAppAsFrontPage.Application
DimobjListAsObject
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Cyclethrougheachlistandcheckforlisttype
ForEachobjListInobjLists
'Ifit'saBasicListthenchangepermissions
IfobjList.Type=fpListTypeBasicListThen
IfobjList.EditSecurity<>fpListEditSecurityOnlyOwnThen
objList.EditSecurity=fpListEditSecurityOnlyOwn
objList.ApplyChanges
EndIf
EndIf
Next
EndSub
![Page 512: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/512.jpg)
EndNumberPropertySetsorreturnsaLongthatrepresentstheendingnumberforthenumberscaleinaratingscalefield.
expression.EndNumber
expressionRequired.AnexpressionthatreturnsaListFieldRatingScaleobject.
![Page 513: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/513.jpg)
ExtensionPropertyReturnsaStringthatrepresentstheextensionforthespecifiedfile.Read-only.
expression.Extension
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 514: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/514.jpg)
Example
ThisstatementreturnstheextensionofthefirstpageintherootfolderoftheactiveWebsite.
myHomePageExt=ActiveWeb.RootFolder.File(0).Extension
![Page 515: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/515.jpg)
FieldsPropertyReturnsaListFieldscollectionthatrepresentsallfieldsinthecurrentlist.TheListFieldscollectioncontainsListFieldobjectsthatcorrespondtothecolumnpropertiesofalistmemberdocument.
expression.Fields
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 516: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/516.jpg)
Example
ThefollowingexampledisplaysthenamesofallfieldsinthefirstlistoftheListscollection.
SubDisplayFields()
'Returnsthefieldscollection
DimobjAppAsFrontPage.Application
DimlstWebListAsList
DimlstFieldsAsListFields
DimlstFieldAsListField
DimStrNameAsString
SetobjApp=FrontPage.Application
SetlstWebList=objApp.ActiveWeb.Lists.Item(0)
SetlstFields=lstWebList.Fields
IfNotActiveWeb.ListsIsNothingThen
ForEachlstFieldInlstFields
'addURLstostring
IfStrName=""Then
'Ifemptystring
StrName=lstField.Name&vbCr
Else
'addnamestostring
StrName=StrName&lstField.Name&vbCr
EndIf
Next
'Displayformattedstring
MsgBox"Thelist"&lstWebList.Name&_
"containsthefollowingfields"&vbCr&vbCr&_
StrName
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
![Page 517: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/517.jpg)
![Page 518: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/518.jpg)
FilePropertyReturnsaWebFileobjectthatrepresentstheWebpageassociatedwiththespecifiedobject.
expression.File
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 519: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/519.jpg)
Example
ThisexamplereturnsthenameoftheWebpageassociatedwithanavigationnodeintheactiveWebsite.
PrivateSubGetFileFromNavNode()
DimmyNavNodeAsNavigationNode
DimmyNavNodesAsNavigationNodes
DimmyNavFilesAsString
DimmyNavFileAsString
OnErrorResumeNext
SetmyNavNodes=ActiveWeb.HomeNavigationNode.Children
ForEachmyNavNodeInmyNavNodes
myNavFile=myNavNode.File.Name
IfERR<>0ThenExitSub
myNavFiles=myNavFiles&myNavFile&vbCrLf
Next
EndSub
![Page 520: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/520.jpg)
ShowAll
![Page 521: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/521.jpg)
FileDialogPropertyReturnsaFileDialogobjectthatrepresentsasingleinstanceofafiledialogbox.
expression.FileDialog(DialogType)
expressionRequired.AnexpressionthatreturnsanApplicationobject.
DialogTypeRequiredMsoFileDialogType.Thetypeofdialogboxtoopen.
MsoFileDialogTypecanbeoneoftheseMsoFileDialogTypeconstants.msoFileDialogFilePickermsoFileDialogFolderPickermsoFileDialogOpenmsoFileDialogSaveAs
![Page 522: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/522.jpg)
Example
ThefollowingexampledisplaystheSaveAsdialogbox.
SubShowSaveAsDialog()
'DisplaytheSaveAsdialogbox
DimdlgSaveAsAsFileDialog
'Setthedialogtype
SetdlgSaveAs=Application.FileDialog(msoFileDialogSaveAs)
'Displaythedialog
dlgSaveAs.Show
EndSub
ThefollowingexampledisplaystheOpendialogbox,andallowstheusertoopenmultiplefilesatthesametime.
SubShowOpenDialog()
'DisplaytheOpendialogbox
DimdlgOpenAsFileDialog
'SetthedialogboxtypetoOpen
SetdlgOpen=Application.FileDialog(msoFileDialogOpen)
'Displaythedialogbox
WithdlgOpen
.AllowMultiSelect=True
.Show
EndWith
EndSub
ThefollowingexampledisplaystheOpendialogbox,andallowstheusertoopenmultiplefilesatthesametime.IfthedocumentsareHTMLfiles,theyareopenedinMicrosoftFrontPage.
SubShowOpenDialog()
'DisplaytheOpendialogbox
DimdlgOpenAsFileDialog
'SetthedialogboxtypetoOpen
DimiasInteger
SetdlgOpen=Application.FileDialog(msoFileDialogOpen)
'Displaythedialogbox
WithdlgOpen
.AllowMultiSelect=True
.Show
![Page 523: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/523.jpg)
EndWith
Fori=1TodlgOpen.SelectedItems.Count
IfRight(dlgOpen.SelectedItems(i),3)="htm"Then
ActiveWebWindow.PageWindows.AdddlgOpen.SelectedItems(i)
EndIf
Next
EndSub
![Page 524: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/524.jpg)
FileDialogViewPagePropertyReturnsorsetsaStringthatrepresentstherelativeURLofthepageassociatedwiththeDocumentLibraryobject.Read/write.
expression.FileDialogViewPage
expressionRequired.AnexpressionthatreturnsaDocumentLibraryobject.
![Page 525: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/525.jpg)
Example
ThefollowingexamplecreatesanewdocumentlibrarycalledNewLibraryanddisplaystherelativeURLoftheFiledialogpage.
SubNewLibrary()
'Addanewlisttothecurrentweb
DimobjAppAsFrontPage.Application
DimobjListsAsLists
DimobjLibraryAsDocumentLibrary
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewlist
objLists.AddName:="NewLibrary",_
ListType:=fpListTypeDocumentLibrary,_
Description:="ListofSharedfiles"
SetobjLibrary=objLists.Item("NewLibrary")
'Displaymessagetouser
MsgBox"AnewlistwasaddedtotheListscollection."&_
"Thepageassociatedwiththefiledialogis"&_
objLibrary.FileDialogViewPage&"."
EndSub
![Page 526: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/526.jpg)
FilesPropertySomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
ReturnsaWebFilescollectionthatrepresentstheitemsinthespecifiedWebfolder.Read-onlyobject.
expression.Files
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 527: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/527.jpg)
Remarks
TheFilespropertyisanaccessorpropertyusedtoaccesstheWebFilescollection.Toaccessthecollection,declareavariableoftypeWebFilesasshowninthestatementDimmyFilesAsWebFiles,andthensetthevariablemyFilestoWeb.RootFolder.Files.
![Page 528: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/528.jpg)
Example
ThefollowingexampleretrievesallofthepropertiesofafileandconcatenatestheMETAtagsintoastringwithapipe("|")delimiterseparatingthedata.
NoteThePropertyKeysshowninthisexampleapplytoaWebsitecreatedwiththeOnePageWebSitetemplate.OthertemplatesmayuseotherPropertyKeys.FormoreinformationaboutusingPropertyKeys,seethePropertiescollection.
PrivateSubGetFileProperties()
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyAuthorAsString
DimmyModifiedByAsString
DimmyTimeCreatedAsString
DimmyTimeLastModifiedAsString
DimmyFileSizeAsString
DimmyTitleAsString
DimmyMetaTagsAsVariant
DimmyMetaTagAsVariant
DimmyProgIDAsVariant
DimmyGeneratorAsString
DimmyTimeLastWrittenAsString
DimmyPropertiesAsProperties
DimmyMetaTagListAsString
SetmyFiles=ActiveWeb.RootFolder.Files
ForEachmyFileInmyFiles
SetmyProperties=myFile.Properties
myAuthor=myAuthor&myProperties("vti_author")
myModifiedBy=myModifiedBy&_
myProperties("vti_modifiedby)&"|"
myTimeCreated=myTimeCreated&_
myProperties("vti_timecreated")&"|"
myTimeLastModified=myTimeLastModified&_
myProperties("vti_timelastmodified")&"|"
myFileSize=myFileSize&_
myProperties("vti_FileSize)&"|"
myTitle=myTitle&myProperties("vti_title")&"|"
myProgID=myProgID&myProperties("vti_title")&"|"
myGenerator=myGenerator&_
myProperties("vti_generator")&"|"
myTimeLastWritten=myTimeLastWritten&_
myProperties("vti_timelastwritten")&"|"
![Page 529: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/529.jpg)
myMetaTags=myProperties("vti_metatags")
ForEachmyMetaTagInmyMetaTags
myMetaTagList=myMetaTagList&myMetaTag&"|"
Next
Next
EndSub
![Page 530: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/530.jpg)
FileSaveFormPropertyReturnsorsetsaStringthatrepresentstherelativeURLoftheformpagethatisdisplayedwhenfilesaresaved.Read/write.
expression.FileSaveForm
expressionRequired.AnexpressionthatreturnsaDocumentLibraryobject.
![Page 531: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/531.jpg)
Example
Thefollowingexamplecreatesanewdocumentlibrarycalled"NewLibrary"anddisplaystherelativeURLofthepageassociatedwithsavingafiletothelibrary.
SubNewLibrary()
'Addsanewlisttothecurrentweb
DimobjAppAsFrontPage.Application
DimobjListsAsLists
DimobjLibraryAsDocumentLibrary
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Addnewlist
objLists.AddName:="NewLibrary",_
ListType:=fpListTypeDocumentLibrary,_
Description:="ListofSharedfiles"
SetobjLibrary=objLists.Item("NewLibrary")
'Displaymessagetouser
MsgBox"AnewlistwasaddedtotheListscollection."&_
"TheURLofthepageassociatedwiththeSavedialogis"&_
objLibrary.FileSaveForm&"."
EndSub
![Page 532: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/532.jpg)
FileSearchPropertyReturnsaFileSearchobjectthatprovidesaccesstofilesearchcapabilitieswithinaWebsite.
expression.FileSearch
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 533: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/533.jpg)
Remarks
TheFileSearchobjectisaMicrosoftOfficesharedobjectanddoesnotacceptaURLasafilenameorfoldernamevalue.
![Page 534: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/534.jpg)
Example
ThefollowingexamplesearchestheAdventureWorksWebsiteanditssubdirectoriesandreturnsthenumberofIndex.htmfilesfound.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\AdventureWorks".Asanalternative,youcanchangethevaluefortheLookInpropertytoaWebsitethatiscurrentlyavailabletoyou.YoumayalsoneedtosetareferencetotheMicrosoftOfficeObjectLibrary(ReferencesoptionontheToolsmenu).
PrivateSubWebFileSearch()
DimmyFileSearchAsFileSearch
DimmyFileCountAsInteger
SetmyFileSearch=Application.FileSearch
WithmyFileSearch
.FileName="index.htm"
.LookIn="C:\MyWebSites\AdventureWorks"
.SearchSubFolders=True
.Execute
myFileCount=.FoundFiles.Count
EndWith
EndSub
![Page 535: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/535.jpg)
FolderPropertyReturnsaWebFolderobjectthatrepresentsthefolderassociatedwiththelist.TheWebfolderhierarchyprovidesthelinktofoldersandfilesonaWebserverdirectory.ThenavigationstructureprovidestheunderlyingstructurefortheWebobjectswithinindividualMicrosoftFrontPageWebsites.
expression.Folder
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 536: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/536.jpg)
Example
ThefollowingexampledisplaysthenameoftheWebfolderassociatedwiththecurrentlist.IfthecurrentWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubReturnFolder()
'Returnsthefolderassociatedwiththelist
DimobjAppAsFrontPage.Application
DimobjFolderAsWebFolder
SetobjApp=FrontPage.Application
IfNotobjApp.ActiveWeb.ListsIsNothingThen
SetobjFolder=objApp.ActiveWeb.Lists(0).Folder
MsgBox"ThenameoftheassociatedWebfolderis:"&_
objFolder.Name&"."
Else
MsgBox"TheActiveWebsitecontainsnolists."
EndIf
EndSub
![Page 537: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/537.jpg)
FoldersPropertySomeofthecontentinthistopicmaynotbeapplicabletosomelanguages.
ReturnsaWebFolderscollectionthatrepresentsthechildfolderscontainedthespecifiedfolder.Read-only.
expression.Folders
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 538: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/538.jpg)
Remarks
TheFolderspropertyreturnstheWebFolderscollectionforthespecifiedWebsite.Toaccessthecollection,youdeclareavariableoftypeWebFoldersasinthestatementDimmyFoldersAsWebFolders,andthensetthevariabletoWeb.RootFolder.Folders.
![Page 539: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/539.jpg)
Example
Thefollowingexampleretrievestwoofthepropertiesofafolderandconcatenatesthedataintoastringwithapipe("|")delimiterseparatingthedata.
NoteThePropertyKeysshowninthisexampleapplytoaWebsitecreatedwiththeOnePageWebSitetemplate.OthertemplatesmayuseotherPropertyKeys.FormoreinformationaboutusingPropertyKeys,seethePropertiescollection.
PrivateSubGetFolderProperties()
DimmyFoldersAsWebFolders
DimmyFolderAsWebFolder
DimmyHasSubDirsAsString
DimmyIsScriptableAsString
DimmyPropertiesAsProperties
SetmyFolders=ActiveWeb.RootFolder.Folders
ForEachmyFolderInmyFolders
SetmyProperties=myFolder.Properties
myHasSubDirs=myHasSubDirs&_
myProperties("vti_hassubdirs")&"|"
myIsScriptable=myIsScriptable&_
myProperties("vti_isscriptable")&"|"
Next
EndSub
![Page 540: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/540.jpg)
FormatPropertyReturnsaStringthatrepresentstheformatofthespecifiedThemeobject.Read-only.
expression.Format
expressionRequired.AnexpressionthatreturnsaThemeobject.
![Page 541: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/541.jpg)
Remarks
ThethemeformatreflectsthedifferencebetweentheformatsforthedifferentversionsofMicrosoftFrontPage.Forexample,theformatnumberforFrontPage98canbeeither0.0or1.0,whiletheformatnumberforFrontPage2000is2.0,andsoon.
![Page 542: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/542.jpg)
Example
ThefollowingexampleretrievestheformatoftheappliedthemefortheactiveWebsite.
PrivateSubGetThemeFormat()
DimmyFormatAsString
myFormat=ActiveWeb.Themes(0).Format
EndSub
![Page 543: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/543.jpg)
FrameWindowPropertyReturnsanFPHTMLWindow2objectthatrepresentsthepagewindowandaccessestheInternetExplorerWindowobjects.
NoteTheDocumentpropertyoftheFPHTMLWindow2objectpointstotheFPHTMLDocumentobjectoftheframespage.
expression.FrameWindow
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
![Page 544: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/544.jpg)
Example
ThisexampleretrievestheIHTMLLocationpropertyoftheFrameWindowobject.
PrivateSubGetFrameWindowLocation()
DimmyWebAsWebEx
DimmyPageAsPageWindowEx
DimmyFrameWindowLocationAsString
SetmyWeb=Webs("C:\MyWebs\CohoWinery")
SetmyPage=_
myWeb.ActiveWebWindow.ActivePageWindow
myFrameWindowLocation=myPage.FrameWindow.Location.href
EndSub
![Page 545: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/545.jpg)
HomePropertyReturnsaHomeNavigationNodeobjectthatrepresentsthenavigationnodeforaspecifiedpage.
expression.Home
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 546: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/546.jpg)
Example
Thefollowingexamplesearchesforanavigationnodewiththelabel"Sale",andthenupdatesit.
PrivateSubChangeNavLabel()
DimmyFilesAsWebFiles
DimmyFileAsWebFile
SetmyFiles=ActiveWeb.RootFolder.Files
ForEachmyFileInmyFiles
IfmyFile.NavigationNode.Home.Label="Sale"Then
myFile.NavigationNode.Home.Label="SalesItems"
EndIf
Next
EndSub
![Page 547: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/547.jpg)
HomeNavigationNodePropertyReturnsaNavigationNodeobjectforthehomepage.
expression.HomeNavigationNode
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 548: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/548.jpg)
Remarks
Thehomenavigationnodeisthestartingpointforallnavigationaddressingwithinthenavigationstructure.Wheneveryouwanttoadd,move,ordeleteanode,changeanyoftheattributesforanode,orjustaccessthecurrentnavigationstructure,youusetheHomeNavigationNodeobjectasastartingpoint.TheonlytimeyouwouldusetheRootNavigationNodeobjecttoaccessthenavigationstructureiswhenyouwanttoaddoraccessanavigationnodeatthesamelevelastheHomeNavigationNodeobject.
![Page 549: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/549.jpg)
Example
ThefollowingexampleaccessestheHomeNavigationNodeobjectandretrievestheURLforthehomepage.
PrivateSubGetHomeNavigationNode()
DimmyWebAsWebEx
DimmyHomeNodeAsNavigationNode
DimmyHomeUrlAsString
SetmyWeb=ActiveWeb
myHomeNode=myWeb.HomeNavigationNode
myHomeUrl=myHomeNode.Url
EndSub
![Page 550: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/550.jpg)
HorizontalResolutionPropertyReturnsthehorizontalresolutionofthescreeninpixels.Read-onlyLong.
expression.HorizontalResolution()
expressionRequired.AnexpressionthatreturnsaSystemobject.
![Page 551: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/551.jpg)
Example
Thefollowingexamplereturnsthehorizontalresolutionofthescreen.
myHoriz=System.HorizontalResolution
![Page 552: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/552.jpg)
InNavBarsPropertyTruetospecifythatthecurrentpagewillbevisibleintheWebsite'slinkbars.Read/writeBoolean.
NoteAlinkbarisasetofhyperlinksusedfornavigatingaWebsite.
expression.InNavBars
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 553: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/553.jpg)
Remarks
AllpageswiththeInNavBarspropertysettoFalsewillappeargrayedoutinNavigationview.
![Page 554: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/554.jpg)
Example
Thefollowingexamplepromptstheusertoselectwhichnavigationnodeswillappearinthelinkbar.IftheuserselectsYes,thecurrentpagewillappearinthelinkbar.IftheuserselectsNo,thecurrentpagewillnotappearinthelinkbarandwillappeargrayedoutinNavigationview.TheuserispromptedforeachnavigationnodeintheactiveWebsite.
SubAllNavigationNodes()
'Returnacollectionofallnavigationnodesusedinthecurrentweb
'Allowsyoutoselectwhichpageswillappearinthelinkbar
DimobjAppAsFrontPage.Application
DimobjNavNodeAsNavigationNode
DimobjNavNodesAsNavigationNodes
DimstrAnsAsString
SetobjApp=FrontPage.Application
'CreateareferencetotheNavigationNodescollection
SetobjNavNodes=objApp.ActiveWeb.AllNavigationNodes
'Foreachnodeinthecollection
ForEachobjNavNodeInobjNavNodes
'Prompttheuser
strAns=MsgBox("Doyouwantthepage"&objNavNode.Label&_
"toappearinthelinkbar?",vbYesNo)
'Ifuseranswersyes,settoTrue
IfstrAns=vbYesThen
objNavNode.InNavBars=True
Else
'Ifno,settoFalse
objNavNode.InNavBars=False
EndIf
'Gotonextnode
NextobjNavNode
EndSub
![Page 555: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/555.jpg)
IsDirtyPropertyTrueifthepagedisplayedinthespecifiedpagewindowhaschangedsincethelasttimetheusersavedthepage.Read-writeBoolean.
expression.IsDirty
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
![Page 556: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/556.jpg)
Example
Thefollowingexamplechecksiftheactivepagehaschanged,andthenexecutestheSavemethodifthepagehasbeenmodified.
PrivateSubDirtyDocument()
DimmyPageAsPageWindowEx
DimmyDocAsFPHTMLDocument
DimmySaveCheckAsBoolean
SetmyDoc=WebWindows(0).PageWindows(0).Document
CallmyDoc.body.insertAdjacentHTML("BeforeEnd",_
"<b>modified</b>")
IfActivePageWindow.IsDirty=TrueThen
ActivePageWindow.Save
EndIf
EndSub
![Page 557: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/557.jpg)
IsExecutablePropertyReturnsorsetsaBooleanthatrepresentsthesettingforexecutepermissionforaWebFolderobject.
expression.IsExecutable
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 558: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/558.jpg)
Example
ThisexampleretrievesthesettingoftheIsExecutablepropertyforaWebFolderobject.
PrivateSubCheckExecutable()
DimmyFolderAsWebFolder
DimmyExeStatusAsBoolean
SetmyFolder=ActiveWeb.RootFolder.Folders("images")
myExeStatus=myFolder.IsExecutable
EndSub
![Page 559: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/559.jpg)
IsHiddenPropertySetsorreturnsaBooleanthatrepresentswhetheralistisdisplayedinthebrowser.
expression.IsHidden
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 560: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/560.jpg)
IsHiddenFoldersEnabledPropertyTruetodisplayhiddenfoldersinthespecifiedWebsite.Read/writeBoolean.
expression.IsHiddenFoldersEnabled
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 561: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/561.jpg)
Example
ThefollowingexamplepromptstheusertodisplayhiddenfoldersinthecurrentWebsite.TheIsHiddenFoldersEnabledpropertyissetbasedontheuser'sresponse.
SubViewAllFolders()
'Promptstheusertoviewhiddenfolders
DimobjAppAsFrontPage.Application
DimobjWebAsWebEx
DimstrAnsAsString
SetobjApp=FrontPage.Application
SetobjWeb=objApp.ActiveWeb
'promptuser
strAns=MsgBox("Doyouwanttoviewhiddenfolders?",vbYesNo)
'Setvalueofpropertytomatchuser'sresponse
IfstrAns=vbYesThen
objWeb.IsHiddenFoldersEnabled=True
Else
objWeb.IsHiddenFoldersEnabled=False
EndIf
EndSub
![Page 562: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/562.jpg)
IsLinkBarPropertyTrueindicatesthatthenavigationnodeisalinkbar.Read-onlyBoolean.
NoteLinkbarsprovidehypertextlinksthatallowyoutonavigatethroughthepagesinthecurrentWebsite.
expression.IsLinkBar
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 563: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/563.jpg)
Example
ThefollowingexampletraversesthenavigationnodehierarchyanddisplaysthenamesofanylinkbarsintheWebsite.Ifnolinkbarsarefoundamessageisdisplayedtotheuser.
SubDisplayLinkBar()
'ReturnacollectionofallnavigationnodesusedinthecurrentWebsite
'Searchesthroughthecollectionanddisplaysthenamesofalllinkbars
DimobjAppAsFrontPage.Application
DimobjNavNodeAsNavigationNode
DimobjNavNodesAsNavigationNodes
DimstrAnsAsString
DimblnFoundAsBoolean
blnFound=False
SetobjApp=FrontPage.Application
'CreateareferencetotheNavigationNodescollection
SetobjNavNodes=objApp.ActiveWeb.AllNavigationNodes
'Foreachnodeinthecollection
ForEachobjNavNodeInobjNavNodes
'IfsettoTrue,thisisalinkbar
IfobjNavNode.IsLinkBar=TrueThen
MsgBoxobjNavNode.Label&"isalinkbar."
blnFound=True
EndIf
'Gotonextnode
NextobjNavNode
'Ifnolinkbarsarefound,displayamessage
IfblnFound=FalseThen
MsgBox"TherearenolinkbarsinthecurrentWebsite."
EndIf
EndSub
![Page 564: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/564.jpg)
IsModifiedPropertyReturnsaBooleanthatrepresentswhetheralisthasbeenchangedsincethelasttimethelistwasupdated.
expression.IsModified
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 565: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/565.jpg)
IsOpenPropertyTrueifthespecifiedWebpageisdisplayedinthepagewindow.Read-onlyBoolean.
expression.IsOpen
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 566: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/566.jpg)
Example
ThefollowingexampleusestheIsOpenpropertytocheckifafilenamed"index.htm"isopen,andopensitifitisn't.
PrivateSubCheckForOpenFile()
DimmyWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileAsWebFile
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
IfmyFile.Name="index.htm"Then
IfmyFile.IsOpen=TrueThen
MsgBox"Thisfileisopen,tryagainlater."
ExitSub
Else
myFile.Open
ExitSub
EndIf
EndIf
Next
EndWith
EndSub
![Page 567: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/567.jpg)
IsOrphanPropertyTrueindicatesthatthefilecannotbereachedbyhyperlinkfromanypageintheWebsite.Read-only.
expression.IsOrphan
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 568: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/568.jpg)
Example
ThefollowingexamplesearchesthroughthecurrentWebsiteanddisplaysthenamesofallorphanfiles.AnorphanfileisdenotedbyitsIsOrphanproperty.OnceafileisfoundwithanIsOrphanpropertythatequalsTrue,theLabelpropertyvalueisaddedtoaStringcontainingthenamesofallorphannodesintheWebsite.Thenamesoftheorphanfiles,storedintheStringvariablestrName,arethendisplayedtotheuser.IfnoorphanfilesarefoundintheWebsite,amessageisdisplayedtotheuser.
SubListOrphans()
'Displaysthenamesoforphanfiles.
DimobjAppAsFrontPage.Application
DimobjWebFileAsWebFile
DimstrNameAsString
SetobjApp=FrontPage.Application
'ForeachfileintheWebsitesite
ForEachobjWebFileInActiveWeb.AllFiles
'Checkifthefileisanorpahn
IfobjWebFile.IsOrphanThen
strName=strName&objWebFile.Name&"|"
EndIf
Next
IfstrName<>""Then
'Displaynamesofallorphanpages
MsgBox"TheorphanpagesinthecurrentWebsiteare:"&vbCr&vbCr&_
strName&"."
Else
'Noorphans,displaymessage
MsgBox"TherearenoorphanpagesintheWebsite."
EndIf
EndSub
![Page 569: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/569.jpg)
![Page 570: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/570.jpg)
IsReadablePropertyTrueindicatesthatafolderishasreadpermission.Read/writeBoolean.
expression.IsReadable
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 571: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/571.jpg)
Example
ThefollowingexampleretrievesthesettingoftheIsReadablepropertyforafoldercalled"images"intheactiveWebsite.
PrivateSubCheckReadable()
DimmyFolderAsWebFolder
DimmyReadStatusAsBoolean
SetmyFolder=ActiveWeb.RootFolder.Folders("images")
myReadStatus=myFolder.IsReadable
EndSub
![Page 572: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/572.jpg)
IsRootPropertyTrueifthespecifiedWebfolderistherootfolderintheWebsite.Read-onlyBoolean.
expression.IsRoot
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 573: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/573.jpg)
Example
ThefollowingexampleretrievesthesettingoftheIsRootpropertyforaWebFolderobject.
PrivateSubCheckExecutable()
DimmyFolderAsWebFolder
DimmyIsRootAsBoolean
SetmyFolder=ActiveWeb.RootFolder.Folders("images")
myIsRoot=myFolder.IsRoot
EndSub
![Page 574: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/574.jpg)
IsUnderRevisionControlPropertyTrueifsourcecontrolisusedonfilesinthespecifiedWebsite.Read-onlyBoolean.
expression.IsUnderRevisionControl
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 575: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/575.jpg)
Remarks
YoumusthaveasourcecontrolprojectcreatedthroughMicrosoftVisualSourceSafeorMicrosoftOfficeinordertouserevisioncontrol.Forinformationaboutsourcecontrolprojects,refertoManagingSourceControlProjects.
![Page 576: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/576.jpg)
Example
Thefollowingexamplecreatesasourcecontrolprojectandthen,inthesecondprocedure,checksthestateoftheIsUnderRevisionControlproperty.
PrivateSubSourceControlProject()
DimmyWebAsWebEx
SetmyWeb=ActiveWeb
IfNot(myWeb.IsUnderRevisionControl)Then
myWeb.RevisionControlProject=_
"<FrontPage-basedLocking>"
EndIf
EndSub
PrivateSubGetRevisionState()
DimmyWebAsWebEx
DimmyRevCtrlProjAsString
DimmyIsRevCtrlAsBoolean
SetmyWeb=ActiveWeb
WithmyWeb
myRevCtrlProj=.RevisionControlProject
myIsUnderRevCtrl=.IsUnderRevisionControl
EndWith
EndSub
![Page 577: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/577.jpg)
IsWebPropertyTrueifthespecifiedWebfolderistherootfolderforaWebsite,whichmaybetherootfolderfortheactiveWebsiteorasubsiteoffoftheactiveWebsite.Read-only.
expression.IsWeb
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 578: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/578.jpg)
Example
ThisexampleretrievesthesettingoftheIsWebpropertyforaWebFolderobject.
PrivateSubCheckExecutable()
DimmyFolderAsWebFolder
DimmyWebStatusAsBoolean
SetmyFolder=ActiveWeb.RootFolder.Folders("images")
myWebStatus=myFolder.IsWeb
EndSub
![Page 579: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/579.jpg)
IsWritablePropertyTrueifafolderhaswritepermissions.Read-onlyBoolean.
expression.IsWritable
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 580: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/580.jpg)
Example
ThefollowingexampleretrievesthesettingoftheIsWritablepropertyforaWebFolderobject.
PrivateSubCheckExecutable()
DimmyFolderAsWebFolder
DimmyWritableStatusAsBoolean
SetmyFolder=ActiveWeb.RootFolder.Folders("images")
myWritableStatus=myFolder.IsWritable
EndSub
![Page 581: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/581.jpg)
ShowAll
![Page 582: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/582.jpg)
ItemPropertyItempropertyasitappliestotheMetaTagsobject.
ReturnsaVariantrepresentingapropertykey/valuepair.
expression.Item(PropertyKey)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PropertyKeyRequiredString.Astringthatcontainsanindexnumberofthecollection.Theindexstartsatzero.
ItempropertyasitappliestothePropertiesobject.
ReturnsorsetsaVariantthatrepresentsaproperty.Read/write.
expression.Item(PropertyKey)
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
PropertyKeyRequiredString.Astringthatcontainsanindexnumberofthecollection.Theindexstartsatzero.
ItempropertyasitappliestoallotherobjectsintheAppliesTolist.
Returnsaanindividualobjectinacollection.
expression.Item(Index)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
IndexRequiredVariant.Thenameorordinalvalueoftheobjectwithinthecollection.Indexstartsatzero.
![Page 583: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/583.jpg)
Example
AsitappliestotheNavigationNodescollection.
Thefollowingexampledemonstratesreturningavaluebyindexinganiteminthecollection.ThisexamplereturnsthelabelforthefirstnavigationnodeinthenavigationstructureoftheactiveWeb.
NoteYouaccesstheNavigationNodescollectionthroughtheChildrenpropertyoftheRootNavigationNodepropertyoftheactiveWeb.
PrivateSubGetNavigationNode()
DimmyWebAsWebEx
DimmyNavNodesAsNavigationNodes
DimmyNavNodeLabelAsString
SetmyWeb=ActiveWeb
myNavNodeLabel=myWeb.RootNavigationNode_
.Children.Item(0).LabelEndSub
AsitappliestotheMetaTagsobject.
ThefollowingstatementreturnsthecontentsofaMETAtagthatexistsonaWebpageintheactiveWeb,anddemonstratesthePropertyKeyargument.
myMetaTagContents=ActiveWeb.RootFolder.Files_
.Item(0).MetaTags.Item("generator")
Itisn'talwaysnecessarytospecifytheindexorpropertynameoftheItempropertywhenreturningvaluesfromacollection.ThefollowingexamplereturnsalistoffilenamesofeachWebpagethatcontainsaMETAtagnameequivalentto"generator"intheactiveWeb,withoutspecifyingtheItemproperty.FindGeneratorTagsretrievesalistofthefilesthatcontainthe"generator"METAtagandaddsvalueoftheItempropertytothevariablemyMetaTag,becauseinthiscasethevalueoftheItempropertyisthesameasthefilename.Thisisdifferentfromthepreviousexample,whichreturnedthecontentsofthe"generator"METAtag.
FunctionFindGeneratorTags()AsString
![Page 584: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/584.jpg)
DimmyWebAsWebEx
DimmyMetaTagsAsMetaTags
DimmyMetaTagAsVariant
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyMetaTagNameAsString
DimmyReturnFileNameAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
SetmyMetaTags=myFile.MetaTags
ForEachmyMetaTagInmyMetaTags
myMetaTagName=myMetaTag
IfmyMetaTagName="generator"Then
myReturnFileName=myReturnFileName&myFile.Name
EndIf
Next
Next
EndWith
FindGeneratorTags=myReturnFileName
EndFunction
![Page 585: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/585.jpg)
ShowAll
![Page 586: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/586.jpg)
LabelPropertyAsitappliestotheNavigationNodeobject.
SetsorreturnsaStringthatrepresentsthelabelassociatedwiththeactivenavigationnode.ThislabelisusedasareferenceforindividualnavigationnodesinNavigationview.Read/write.
expression.Label()
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 587: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/587.jpg)
Remarks
UsethetextintheLabelpropertyforthetextinabannerorbuttonthatlinkstoanothernavigationnodeinthenavigationstructure.
AsitappliestotheThemeobject.
ReturnsaStringthatrepresentsthenameofthespecifiedtheme.
expression.Label()
expressionRequired.AnexpressionthatreturnsaThemeobject.
![Page 588: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/588.jpg)
Example
AsitappliestotheNavigationNodeobject.
Thefollowingexamplesetsthetextforthelabelofthefirstchildnode.ThelabelshowstheplacementofthenodeinNavigationview.
PrivateSubAddLabelToNavigationNode()
DimmyNodeAsNavigationNode
SetmyNode=ActiveWeb.HomeNavigationNode.Children(0)
myNewNode.Label="FinancePage"
EndSub
AsitappliestotheThemeobject.
Thefollowingexampleretrievesthenameofatheme.
NoteTorunthisprocedure,youmusthaveanopenWebsitewithapagethathaspreviouslyhadathemeappliedtoit.
PrivateSubGetThemeName()
DimmyThemeAsString
myTheme=ActiveWeb.Themes(0).Label
EndSub
![Page 589: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/589.jpg)
LanguageDesignationPropertyReturnstheabbreviatednameofthedesignatedlanguageofthesystemsoftware.Read-onlyString.
expression.LanguageDesignation()
expressionRequired.AnexpressionthatreturnsaSystemobject.
![Page 590: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/590.jpg)
Remarks
Usingthetwo-letterlanguageabbreviationfromtheISOStandard639andaddingathirdletter,suchas"u"fortheUnitedStates,createsthethree-letterabbreviation.
Youcanalsogetthetwo-letterlanguageabbreviationwithGetLocaleInfo()byspecifyingLOCALE_SABBREVLANGNAMEastheLCType.Theabbreviatedname"enu"isreturnedfortheEnglish(U.S.)languageandisthesameabbreviationthatisreturnedwiththeLanguageDesignationproperty.
![Page 591: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/591.jpg)
Example
Thisexampledisplaystheabbreviatednameofthedesignatedlanguageofthesystemsoftware.
myLang=System.LanguageDesignation
![Page 592: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/592.jpg)
LanguageSettingsPropertyReturnstheLanguageSettingsobjectfortheMicrosoftFrontPageapplication.Read-onlyLanguageSettings.
expression.LanguageSettings()
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 593: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/593.jpg)
Example
ThefollowingexamplereturnstheLanguageIDpropertyfortheuserinterfaceandsetstheLanguagePreferredForEditingproperties.
TheLanguageSettingspropertyhasarequiredconstantcalledMsoAppLanguageID.TheenumeratedvaluesforthisconstantaremsoLanguageIDHelp,msoLanguageIDInstall,msoLanguageIDUI,andmsoLanguageIDUIPrevious.TheLanguagePreferredForEditingpropertyalsohasenumeratedconstantsfortheavailablelanguages.Formoredetailedinformation,seetheLanguageSettingsobject.
PrivateSubGetLanguageInfo()
DimmyLSetAsLanguageSettings
DimmyLangIDAsString
DimprfLangAsString
SetmyLSet=Application.LanguageSettings
WithmyLSet
myLangID=.LanguageID(msoLanguageIDUI)
prfLang=_
.LanguagePreferredForEditing(msoLanguageIDEnglishUS)_
=True
EndWith
EndSub
![Page 594: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/594.jpg)
ListPropertyReturnsaListobjectthatrepresentsthelistassociatedwiththespecifiedfolder.
expression.List
expressionRequired.AnexpressionthatreturnsaWebFolderobject.
![Page 595: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/595.jpg)
Example
ThefollowingexamplereturnsthelistobjectassociatedwiththesecondfolderintheactiveWebsiteanddisplaysthenamesofallfieldsinthelist.
SubReturnList()
'Returnsthelistassociatedwithafolder
DimobjAppAsFrontPage.Application
DimobjFolderAsWebFolder
DimobjListFieldAsListField
DimobjListAsList
DimstrNameAsString
SetobjApp=FrontPage.Application
ForEachobjFolderInobjApp.ActiveWeb.AllFolders
IfNotobjFolder.ListIsNothingThen
'ReturntheListusingtheListproperty
SetobjList=objFolder.List
ForEachobjListFieldInobjList.Fields
'Addlistnamestostring
IfstrName=""Then
strName=objListField.Name&vbCr
Else
strName=strName&objListField.Name&vbCr
EndIf
Next
MsgBox"Thefieldnameswithinthe"&objList.Name&"listare:"&vbCr&_
strName
EndIf
Next
EndSub
![Page 596: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/596.jpg)
ListsPropertyReturnsaListscollectionobjectthatrepresentsacollectionofalllistsinaWebsite.AlistcanbeaDocumentLibraryobject,aBasicListobject,oraSurveyobject.
expression.Lists
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 597: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/597.jpg)
Example
ThefollowingexamplereturnsareferencetotheListscollectionusingtheListspropertyfortheactiveWebsite.Theexampledisplaysthenameofeachlistinthecollection.
SubViewLists()
'ReturnsacollectionofalllistsintheWebsite
DimobjAppAsFrontPage.Application
DimobjWebAsWebEx
DimobjlistsAsLists
DimobjlistAsList
SetobjApp=FrontPage.Application
SetobjWeb=objApp.ActiveWeb
'ReferencetheListscollection
Setobjlists=objWeb.Lists
'DisplaythenameofeachlistintheListscollection
Fori=1Toobjlists.Count
MsgBox"Thenameofthelistis"&objlists.Item(i).Name
Nexti
EndSub
![Page 598: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/598.jpg)
LookupFieldPropertyReturnsaListFieldobjectthatdefinesthefieldonwhichtoperformasearch.
expression.LookupField
expressionRequired.AnexpressionthatreturnsaListFieldLookupobject.
![Page 599: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/599.jpg)
Example
ThefollowingexamplecreatesanewfieldoftypefpFieldLookupanddisplaysthenameofthenewfieldandthenameofthefieldthatisbeingsearched.
SubCreateLookup()
'AddsnewLookupfield
DimobjAppAsFrontPage.Application
DimobjLstFldsAslistFields
DimobjFldLookupAsListFieldLookup
DimObjFieldAsListField
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="NewFileLookupField"
'AddnewFieldoftypefpFieldLookuptolist
objLstFlds.AddName:=strName,Description:="NewLookupField",_
Fieldtype:=fpFieldLookup
SetobjFldLookup=objLstFlds.Item("NewFileLookupField")
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&".Thefieldusedforthe"&_
"lookupis"&objFldLookup.LookupField.Name&"."
EndSub
![Page 600: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/600.jpg)
MaximumValuePropertyReturnsorsetsaVariantthatspecifiesthemaximumvalueallowedforthisfield.ThispropertyistheequivalentofsettingtheMaximumvalueallowedfieldintheModifyFielddialogboxoftheuserinterface.Read/write.
expression.MaximumValue
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 601: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/601.jpg)
Remarks
Anerrormessagewillbedisplayedtotheuserifinvaliddataisenteredintothisfield.UsetheMinimumValuepropertyvaluetosettheminimumvalueforthefield.
![Page 602: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/602.jpg)
Example
ThefollowingexampledisplaysthenamesandmaximumvaluesofallfieldsoftypefpFieldNumberandfpFieldCurrencyinthefirstlistoftheactiveWebsite.Ifthelistcontainsnofieldsofthistype,amessageisdisplayedtotheuser.
SubDisplayMaximum()
'DisplaysthemaximumvalueofallListFieldNumber
'andListFieldCurrencyfieldsinthelist
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
DimobjLstFldAsObject
DimstrValuesAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Cyclethroughlistsandaddvaluetostring
ForEachobjLstFldInobjLstFlds
If(objLstFld.Type=fpFieldNumber)Or(objLstFld.Type=fpFieldCurrency)Then
strValues=strValues&objLstFld.Name&vbTab&_
objLstFld.MaximumValue&vbCr
EndIf
NextobjLstFld
IfstrValues<>""Then
MsgBox"Thefieldsandtheirmaximumvaluesare:"&vbCr&_
vbCr&strValues
Else
MsgBox"TherearenoListFieldNumberorListFieldCurrencyfieldsinthecurrentlist."
EndIf
EndSub
ThefollowingexamplechangesthemaximumvalueofallfieldsoftypeListFieldNumberinthefirstlistoftheactiveWebsitetoaconstantwiththevalue200.
NoteUsetheApplyChangesmethodtoapplyanychangesmadetothelist.
SubChangeMaximum()
'Changesmaximumvalueforallfieldsoftype
'ListFieldNumber
![Page 603: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/603.jpg)
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
DimobjLstFldAsObject
ConstvarMaxAsVariant=200
SetobjApp=FrontPage.Application
IfobjApp.ActiveWeb.Lists.Count>0Then
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Cyclethroughlistsandchangevalues
ForEachobjLstFldInobjLstFlds
IfobjLstFld.Type=fpFieldNumberThen
objLstFld.MaximumValue=varMax
EndIf
NextobjLstFld
objApp.ActiveWeb.Lists(0).ApplyChanges
Else
MsgBox"TheactiveWebsitecontainsnolists."
EndIf
EndSub
![Page 604: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/604.jpg)
MaxLengthProperty(WebObjectModel)ReturnsorsetsaLongthatrepresentsthemaximumlength(incharacters)ofthespecifiedfield.Read/write.
expression.MaxLength
expressionRequired.AnexpressionthatreturnsaListFieldSingleLineobject.
![Page 605: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/605.jpg)
Example
ThefollowingexampleaddsanewfieldoftypefpFieldSingleLinetotheListFieldscollectionofthefirstlistintheactiveWebsiteanddisplaysthenameofthenewfield,thenameofthelisttowhichitwasadded,andthemaximumlengthincharactersofthenewfield.
SubCreateSingleLineField()
'AddnewSingleLineField
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimobjListFieldAsListFieldSingleLine
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="AlternativeName"
'AddnewfieldoftypefpFieldSingleLinetolist
objLstFlds.AddName:=strName,Description:="NumericTotalField",_
Fieldtype:=fpFieldSingleLine
SetobjListField=objLstFlds.Item("AlternativeName")
MsgBox"Anewfieldnamed"&strName&_
"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&
_".Themaximumlengthofthe"&_
"fieldis"&objListField.MaxLength&"characters."
EndSub
![Page 606: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/606.jpg)
MetaTagsPropertyReturnstheMetaTagscollectionforthespecifiedWebFileobject.
expression.MetaTags
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 607: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/607.jpg)
Example
ThefollowingexampleiteratesthroughtheMETAtagscollectionineachfileintheactiveWebsiteandconcatenatesthefilenamesandMETAtagnamesintoastringcalledmyReturnInfo.
PrivateSubGetMetaTagInfo_Click()
DimmyWebAsWebEx
DimmyFilesAsWebFiles
DimmyFileAsWebFile
DimmyMetaTagsAsMetaTags
DimmyMetaTagAsVariant
DimmyFileNameAsString
DimmyMetaTagNameAsString
DimmyReturnInfoAsString
SetmyWeb=ActiveWeb
SetmyFiles=myWeb.RootFolder.Files
WithmyWeb
ForEachmyFileInmyFiles
SetmyMetaTags=myFile.MetaTags
ForEachmyMetaTagInmyMetaTags
myFileName=myFile.Name
myMetaTagName=myMetaTag
myReturnInfo=myFileName&":"_
&myMetaTagName
Next
Next
EndWith
EndSub
![Page 608: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/608.jpg)
MinimumValuePropertyReturnsorsetsaVariantthatspecifiestheminimumallowedvalueforthefield.ThispropertyistheequivalentofsettingtheMinimumvalueallowedfieldintheModifyFielddialogboxoftheuserinterface.Read/write.
expression.MinimumValue
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 609: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/609.jpg)
Remarks
Anerrormessagewillbedisplayedtotheuserifinvalidinformationisenteredintothisfield.UsetheMaximumValuepropertytosetthemaximumallowedvalueofthefield.
![Page 610: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/610.jpg)
Example
ThefollowingexampledisplaysthenamesandminimumvaluesforallfieldsoftypefpFieldNumberandfpFieldCurrencyinthefirstlistoftheactiveWebsite.
SubDisplayMinimum()
'DisplaystheminimumvalueofallListFieldNumber
'andListFieldCurrencyfieldsinthelist
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
DimobjLstFldAsObject
DimstrValuesAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Cyclethroughlistsandaddvaluetostring
ForEachobjLstFldInobjLstFlds
If(objLstFld.Type=fpFieldNumber)Or(objLstFld.Type=fpFieldCurrency)Then
strValues=strValues&objLstFld.Name&vbTab&_
objLstFld.MinimumValue&vbCr
EndIf
NextobjLstFld
IfstrValues<>""Then
MsgBox"Thefieldsandtheirminimumvaluesare:"&vbCr&_
vbCr&strValues
Else
MsgBox"TherearenoListFieldNumberorListFieldCurrencyfieldsinthecurrentlist."
EndIf
EndSub
ThefollowingexamplechangestheminimumvalueofallfieldsoftypefpListFieldNumberinthefirstlistintheactiveWebsitetoaconstantwiththevalue200.
NoteUsetheApplyChangesmethodtoapplyanychangesmadetothelist.
SubChangeMinimum()
'Changesminimumvalueforallfieldsoftype
'ListFieldNumber
![Page 611: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/611.jpg)
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
DimobjLstFldAsObject
ConstvarMinAsVariant=1
SetobjApp=FrontPage.Application
IfobjApp.ActiveWeb.Lists.Count>0Then
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Cyclethroughlistsandchangevalues
ForEachobjLstFldInobjLstFlds
IfobjLstFld.Type=fpFieldNumberThen
objLstFld.MinimumValue=varMin
EndIf
NextobjLstFld
objApp.ActiveWeb.Lists(0).ApplyChanges
Else
MsgBox"TheactiveWebsitecontainsnolists."
EndIf
EndSub
![Page 612: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/612.jpg)
MonthsShownPropertyReturnsorsetsaLongthatdetermineshowmanymonthswillbedisplayedintheMicrosoftFrontPageReportsview.Read/write.
expression.MonthsShown
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 613: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/613.jpg)
Example
Thefollowingexamplepromptstheusertoenterthenumberofmonthsheorshewantstoviewinthereport,andthensetstheMonthsShownpropertytothatvalue.Thesubroutine"SetMonths"promptstheuserforinput,performsavalidationontheinputdata,convertsittothecorrecttypeandsetstheMonthsShownpropertytothenewvalue.Ifthevalueisofanincorrecttype,anerrormessageisdisplayedtotheuser.
SubSetMonthsShown()
'ModifiestheMonthsShownproperty
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
CallSetMonths(objApp)
EndSub
SubSetMonths(ByRefobjAppAsApplication)
'SetsthenumberofmonthstoviewinReportsview
DimvarNumAsVariant
DimlngNumAsLong
'Prompttheusertoenteravalue
varNum=InputBox("Enterthenumberofmonthsyouwishtoviewinthereport.")
'Checktoseethatthevalueisofthecorrecttype
IfIsNumeric(varNum)Then
'Ifit'snumeric,convertittoLong
lngNum=CLng(varNum)
'SettheMonthsShownvaluetothenewvalue
objApp.MonthsShown=lngNum
'Displaythenewsettinginformationtotheuser
MsgBox"TheMonthsShownvaluewassetcorrectly."&_
"Thenumberofmonthsthatwillbeshownis"_
&lngNum&"."
Else
'Otherwise,displayanerrormessagetotheuser
MsgBox"Theinputvaluewasincorrect",vbCritical
EndIf
EndSub
![Page 614: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/614.jpg)
![Page 615: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/615.jpg)
NamePropertyReturnsaStringthatrepresentsthenameassignedtothespecifiedobject.Read-onlyString.
expression.Name
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 616: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/616.jpg)
Remarks
ThenameofafileorfolderisusuallythelastpartoftheURL.Forexample,ifyouhaveaURLof"C:\MyWebSites\AdventureWorks\index.htm",thevalueoftheNamepropertyforthefileis"index.htm".Similarly,"Images"isthevalueoftheNamepropertyforthefolderintheURL"C:\MyWebSites\AdventureWorks\Images".
![Page 617: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/617.jpg)
Example
ThefollowingstatementreturnstheapplicationnamewithAppNameasthestringvariable.
AppName=Application.Name
![Page 618: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/618.jpg)
NavigationNodePropertyReturnsaNavigationNodeobjectthatrepresentsthecurrentnodeinthenavigationstructure.
expression.NavigationNode
expressionRequired.AnexpressionthatreturnsaWebFileobject.
![Page 619: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/619.jpg)
Remarks
IfaNavigationNodeisnotfoundwithinthenavigationstructureforthespecifiedWebsite,theNavigationNodepropertyreturnsNull.
![Page 620: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/620.jpg)
Example
ThefollowingexampleusestheNavigationNodepropertytoreturnthefilenameassociatedwiththenavigationnode.
PrivateSubGetNavNode()
DimmyWebAsWebEx
DimmyNavNodeAsNavigationNode
DimmyNavNodeLabelAsString
SetmyWeb=ActiveWeb
SetmyNavNode=_
myWeb.RootNavigationNode.Files(0).NavigationNode
WithmyNavNode
myNavNodeLabel=.Label
EndWith
EndSub
![Page 621: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/621.jpg)
NewFormPropertyReturnsorsetsaStringthatrepresentstheformusedforaddingnewcontenttothecurrentlistinMicrosoftFrontPage.Read/write.
expression.NewForm
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 622: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/622.jpg)
Remarks
ThedefaultfilenamefortheBasicListandSurveyobjectsisNewForm.htm.ThedefaultfilenamefortheDocumentLibraryobjectisUpload.htm.
![Page 623: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/623.jpg)
Example
ThefollowingexampledisplaysthenameofeachlistintheactiveWebsiteandtherelativeURLsoftheirassociatedNewformpages.IftheactiveWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubViewNewFormURL()
'DisplaytheURLoftheform
'associatedwithaddingnewcontent
DimlstWebListAsList
DimstrURLAsString
IfNotActiveWeb.ListsIsNothingThen
'CyclethroughlistsandaddURLstostring
ForEachlstWebListInActiveWeb.Lists
IfstrURL=""Then
strURL=lstWebList.Name&"-"&_
lstWebList.NewForm&vbCr
Else
strURL=strURL&lstWebList.Name&"-"&_
lstWebList.NewForm&vbCr
EndIf
Next
'DisplayURLsofallNewformsinWebsite
MsgBox"TherelativeURLsoftheNewformsare:"_
&vbCr&vbCr&strURL
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 624: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/624.jpg)
NewPageorWebPropertyReturnsaNewFileobjectthatrepresentsapageorWebsitelistedontheNewtaskpane.
expression.NewPageorWeb
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 625: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/625.jpg)
Example
ThefollowingexamplecreatesanewinstanceoftheNewFileobjectandaddsafilenamed"template.htm"totheNewtaskpane.ThenewfilelistingwillshowupundertheOtherfilessectionlistedatthebottomofthetaskpane.
SubNewPage()
'CreatesanewpageusingtheNewFileobject
DimobjAppAsFrontPage.Application
DimobjNewFileAsNewFile
SetobjApp=FrontPage.Application
'CreateareferencetoaninstanceoftheNewFileobject
SetobjNewFile=objApp.NewPageorWeb
objNewFile.Add"template.htm"
EndSub
![Page 626: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/626.jpg)
NextPropertyReturnsaNavigationNodeobjectthatrepresentsthenextnavigationnodeinthenavigationsequence.Read-onlyObject.
expression.Next
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 627: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/627.jpg)
Remarks
AlthoughtheNextpropertyisamemberoftheNavigationNodeclass,thispropertynavigateswithintheChildrencollectionofthespecifiedNavigationNodeobject.
NoteTheChildrencollectiondoesnotwrap,sothatcodesuchasChildren(Children.Count–1).Nextreturnsan"ObjectvariableorWithblockvariablenotset"error.
![Page 628: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/628.jpg)
Example
Thefollowingexamplemovesthenavigationpointertothenextnode,unlessthecurrentnodeisthelastnodeofthelevelinthenavigationstructure.
PrivateSubMoveNext()
DimtheNodeAsNavigationNode
DimtheNextNodeAsNavigationNode
OnErrorResumeNext
SettheNode=ActiveWeb.HomeNavigationNode.Children(1)
SettheNextNode=theNode.Next
IfErr<>0then
MsgBox"Endofthecurrentnavigationrow"
EndIf
EndSub
![Page 629: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/629.jpg)
NumberOfLinesPropertyReturnsorsetsaLongthatrepresentsthenumberoflinesthatwillappearinthefield.Read/write.
expression.NumberOfLines
expressionRequired.AnexpressionthatreturnsaListFieldMultiLineobject.
![Page 630: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/630.jpg)
Example
ThefollowingexampleaddsanewListFieldMultiLinefieldnamed"Description"totheListFieldscollection.Thesubroutinedisplaysthenameofthenewfieldaswellasthenumberoflinesitwillcontain.
SubCreateMultiLine()
'AddnewMultiLineField
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimObjFieldAsListField
DimobjLstFldMultiAsListFieldMultiLine
DimstrNameAsString
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
strName="Description"
'AddnewFieldoftypefpFieldMultiLinetolist
objLstFlds.AddName:=strName,Description:="DescriptionField",_
Fieldtype:=fpFieldMultiLine
SetobjLstFldMulti=objLstFlds.Item(strName)
objLstFldMulti.NumberOfLines=5
MsgBox"Anewfieldnamed"&strName&"wasaddedtothelist"&_
objApp.ActiveWeb.Lists.Item(0).Name&".Itcontains"&_
objLstFldMulti.NumberOfLines&"lines."
EndSub
![Page 631: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/631.jpg)
OlderFilePropertyReturnsorsetsaLongthatdeterminesthenumberofdaysthatafilemustexistinaWebsite(withoutbeingmodified)beforeitisclassifiedasolder.Onceafileisclassifiedasolder,itappearsintheOlderFilesviewintheReportsview.Read/write.
expression.OlderFile
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 632: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/632.jpg)
Remarks
UsetheRecentFilepropertytoreturnorsetthenumberofdaysthataneworrecentlymodifiedfileshowsupintheRecentlyAddedFileslistintheReportsview.
![Page 633: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/633.jpg)
Example
Thefollowingexamplepromptstheusertoenteravaluethatspecifiesthenumberofdaysafilemustexistbeforeitisclassifiedasolder.ThesubroutineSetOldValpromptstheuserforinput,performsavalidationontheinputdata,convertsittothecorrecttype,andsetstheOlderFilepropertytothenewvalue.Ifthevalueisofanincorrecttype,anerrormessageisdisplayedtotheuser.
SubFPOldFile()
'Setsavaluethatdetermineshowoldafileis
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
CallSetOldVal(objApp)
EndSub
SubSetOldVal(ByRefobjAppAsApplication)
'Setsthevaluethatdetermineshowoldafileis
DimvarNumAsVariant
DimlngNumAsLong
'Prompttheusertoenteravalue
varNum=InputBox("Enterthenumberofdaysafilecanexist"&
_"beforeitisclassifiedasold.")
'Checktoseethatthevalueisofthecorrecttype
IfIsNumeric(varNum)Then
'Ifit'snumeric,convertittoLong
lngNum=CLng(varNum)
'SettheOlderFIlevaluetothenewvalue
objApp.OlderFile=lngNum
'Displaythenewsettinginformationtotheuser
MsgBox"TheOlderFilevaluewassetcorrectly."&vbCr&_
"Thenumberofdaysafterwhichafilebecomesoldis"_&lngNum&"."
Else
'Otherwise,displayanerrormessagetotheuser
MsgBox"Theinputvaluewasincorrect.",vbCritical
EndIf
EndSub
![Page 634: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/634.jpg)
![Page 635: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/635.jpg)
OperatingSystemPropertyReturnsaStringthatrepresentsthenameofthecurrentoperatingsystem,forexample,“Windows”or“WindowsNT”.
expression.OperatingSystem()
expressionRequired.AnexpressionthatreturnsaSystemobject.
![Page 636: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/636.jpg)
Example
Thefollowingexampledisplayssysteminformationinalabelonaform.
lblSystemInfo.Caption=System.OperatingSystem
ThisexampleprintsthenameofthecurrentoperatingsystemintheImmediatewindow.
myOpSys=System.OperatingSystem
![Page 637: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/637.jpg)
ShowAll
![Page 638: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/638.jpg)
OptimizeHTMLFlagsPropertyReturnsorsetsanFpOptimizeHTMLFlagsconstantthatrepresentshowtheHyperTextMarkupLanguage(HTML)isoptimizedinaWebpage.
FpOptimizeHTMLFlagscanbeoneormoreofthefollowingFpOptimizeHTMLFlagsconstants.
fpHtmlOptAdjacentTags Combinesadjacentelementsofthesametype.
fpHtmlOptAuthorComponents RemovesAuthor-TimeFrontPageWebcomponentcomments.
fpHtmlOptBrowseComponents RemovesBrowse-TimeFrontPageWebcomponentcomments.
fpHtmlOptCellFormattingAttr Removescellformattingsttributes.
fpHtmlOptDwtCmnts RemovesDynamicWebTemplatecomments.
fpHtmlOptEmpty Removesemptytags.
fpHtmlOptGeneratorRemovesMETAelementsthatcontainGeneratorandProgramaticIdentifierinformation.
fpHtmlOptHTMLAllWhitespace Removesallwhitespacesthatdon'taffectrendering.
fpHtmlOptHTMLCmnts RemovesallotherHTMLcomments.
fpHtmlOptHTMLLeadWhitespace Removesleadingwhitespacesfromeachline.fpHtmlOptHTMLMisnest Removesincorrectlynestedtags.fpHtmlOptOn Enablesoptimization.fpHtmlOptScriptCmnts Removesscriptcomments.fpHtmlOptThemes Removesthemecomments.
fpHtmlOptTrcImageAttr RemovesimagetracingattributesfromtheBODYelement.
fpHtmlOptUnusedStyles Removesunusedstyles.RemovesVectorMarkupLanguage
![Page 639: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/639.jpg)
fpHtmlOptVMLGraphics (VML)fromapagethatusesOfficedrawingsandWordArt.
fpHtmlOptWordHTML RemovesWord-specificHTMLmarkup.
expression.OptimizeHTMLFlags
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 640: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/640.jpg)
Remarks
UsefpHTMLOptOntoturnoptimizationon.Specifyadditionaloptimizationsettingsbyseparatingeachwithanampersand(&).
![Page 641: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/641.jpg)
Example
ThefollowingexampleturnsoptimizationonforthecurrentpageandspecifiesthatallMicrosoftFrontPageWebcomponentcommentsaretoberemovedfromthepage.
Application.OptimizeHTMLFlags=fpHtmlOptOn_
+fpHtmlOptAuthorComponents+fpHtmlOptBrowseComponents
![Page 642: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/642.jpg)
ShowAll
![Page 643: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/643.jpg)
OptimizeHTMLPublishFlagsPropertySetsorreturnsoneormoreFpOptimizeHTMLFlagsconstantsthatrepresentshowtheHyperTextMarkupLanguage(HTML)inthepagesofaWebsiteisoptimizedduringpublishing.
FpOptimizeHTMLFlagscanbeoneormoreofthefollowingFpOptimizeHTMLFlagsconstants.
fpHtmlOptAuthorComponents RemovesAuthor-TimeFrontPageWebcomponentcomments.
fpHtmlOptBrowseComponents RemovesBrowse-TimeFrontPageWebcomponentcomments.
fpHtmlOptCellFormattingAttr Removescellformattingattributes.
fpHtmlOptDwtCmnts RemovesDynamicWebTemplatecomments.
fpHtmlOptGeneratorRemovesMETAelementsthatcontainGeneratorandProgramaticIdentifierinformation.
fpHtmlOptHTMLAllWhitespace Removesallwhitespacesthatdon'taffectrendering.
fpHtmlOptHTMLCmnts RemovesallHTMLcomments.
fpHtmlOptHTMLLeadWhitespace Removesleadingwhitespacesfromeachline.fpHtmlOptOn Enablesoptimization.fpHtmlOptScriptCmnts Removesscriptcomments.fpHtmlOptThemes Removesthemecomments.
fpHtmlOptTrcImageAttr RemovesimagetracingattributesfromtheBODYelement.
fpHtmlOptVMLGraphicsRemovesVectorMarkupLanguage(VML)fromapagethatusesOfficedrawingsandWordArt.
fpHtmlOptWordHTML RemovesWord-specificHTMLmarkup.
![Page 644: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/644.jpg)
expression.OptimizeHTMLPublishFlags
expressionRequired.AnexpressionthatreturnsoneaWebExobject.
![Page 645: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/645.jpg)
Remarks
UsefpHTMLOptOntoturnoptimizationon.Specifyadditionaloptimizationsettingsbyseparatingeachwithanampersand(&).
![Page 646: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/646.jpg)
Example
ThefollowingexampleturnsoptimizationonfortheactiveWebsiteandspecifiesthatallMicrosoftFrontPageWebcomponentcommentsaretoberemovedwhenpublishingthesite.
ActiveWeb.OptimizeHTMLPublishFlags=fpHtmlOptOn_
+fpHtmlOptAuthorComponents+fpHtmlOptBrowseComponents
![Page 647: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/647.jpg)
OrganizationNamePropertyReturnsthenameoftheorganizationfortheapplication.Read-onlyString.
NoteThenameoftheorganizationisusuallysetduringtheinstallationofanapplicationoroperatingsystem.
![Page 648: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/648.jpg)
Example
InsteadofcreatingacompanynamevariableforyourWebpage,youcanusetheorganizationnameasshowninthefollowingstatement.
myCompanyName=Application.OrganizationName
![Page 649: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/649.jpg)
PageWindowsPropertyReturnsthespecifiedPageWindowExobject.
expression.PageWindows
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
![Page 650: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/650.jpg)
Example
ThefollowingexampleretrievesapagewindowthatcontainsthepageSpain.htmandsetstheviewmodetoPreview.
NoteTorunthisprocedure,youmusthaveanopenWebsitethatcontainsanopenpagecalledSpain.htm,orsubstituteafileofyourchoice.
PrivateSubSetPagePreview()
DimmyPageAsPageWindowEx
SetmyPage=ActiveWebWindow.PageWindows("Spain.htm")
myPage.ViewMode=fpPageViewPreview
EndSub
![Page 651: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/651.jpg)
ParentPropertyReturnsanObjectthatrepresentstheParentobjectforthespecifiedobject.
expression.Parent
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 652: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/652.jpg)
Remarks
SpecifyingtheParentpropertyofaWebFileobjectreturnstheWebFolderobject.WhenanobjectiscontainedinaWebsite,theParentpropertyreturnstheWebExobject.Forexample,iftheThemeobjectiscontainedinaWebExobjectcalled"AdventureWorksWeb",theParentpropertyreturns"AdventureWorksWeb";otherwise,forathemereferencedoutsideofaWebExobject,theParentpropertyreturnsthenameoftheApplicationobject—inthiscase,"MicrosoftFrontPage".However,whentheSystemobjectisspecifiedfromaclientcomputer,theParentpropertyreturnstheApplicationobjectofthehost,nottheclient.
Thefollowingtabledescribesthevaluesreturnedforthedifferentobjecttypes.
Object DescriptionMetaTags ReturnstheWebFileobjectfortheMETAtags.
NavigationNodeReturnstheparentNavigationNodeobject,exceptinthecaseoftheRootNavigationNodeobject,whoseparentistheWebExobject.
NavigationNodes ReturnstheparentNavigationNodeobjectforthecollectionofnavigationnodesbasedonthenavigationstructure.
PageWindowEx ReturnstheWebWindowExorApplicationobjectinwhichthepageresides.
PageWindows ReturnstheApplicationobjectthatcontainsthecollection.
Properties ReturnstheWebEx,WebFile,orWebFolderobjectfromtheMETAtaginformation.
System ReturnstheApplicationobject.Theme ReturnstheparentWebExorWebFileobjectforthetheme.Themes ReturnstheWebExobjectthatcontainsthecollection.WebEx ReturnstheApplicationobject.WebFile ReturnstheWebFolderobject.WebFiles ReturnstheparentWebFolderobject.
WebFolderReturnseithertheparentWebFolderobject(ifit'sasubfolder)ortheWebExobjectfortherootfolder.
![Page 653: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/653.jpg)
WebFolders ReturnstheWebFolderobjectthatcontainsthecollection.Webs ReturnstheApplicationobject.
WebWindowEx ReturnstheApplicationobjectthatcontainsthespecifiedobject.
WebWindows ReturnstheApplicationobjectthatcontainsthecollection.
![Page 654: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/654.jpg)
Example
Inthefollowingexample,myParentreturnsthefiletypeandbuildoftheparentapplicationfortheactiveWebsite.
PrivateSubGetParentInfo()
DimmyWebAsWebEx
DimmyParentAsString
DimmyParentBuildAsString
SetmyWeb=Application.ActiveWeb
WithmyWeb
myParent=.Parent.FileSearch.FileType
myParentBuild=.Parent.Build
EndWith
EndSub
![Page 655: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/655.jpg)
PrevPropertyReturnsaNavigationNodeobjectthatrepresentsthepreviousnavigationnodeinthenavigationsequence.Read-only.
expression.Prev
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 656: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/656.jpg)
Example
Thefollowingexamplemovesthenavigationpointertothepreviousnode,unlessthecurrentnodeisthefirstnodeofthelevelinthenavigationstructure.
PrivateSubMovePrev()
DimtheNodeasNavigationNode
DimthePrevNodeasNavigationNode
OnErrorResumeNext
SettheNode=ActiveWeb.HomeNavigationNode.Children(1)
SetthePrevNode=theNode.Prev
IfErr<>0Then
MsgBox"Thecurrentnavigationlevelstartshere."
EndIf
EndSub
![Page 657: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/657.jpg)
PreviewDocumentPropertyReturnsanIHTMLDocument2objectthatrepresentsthedocumentinthepreviewmodeofthePageview.
expression.PreviewDocument
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
![Page 658: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/658.jpg)
Remarks
ThePreviewDocumentpropertyreturnsnothingiftheactivepagewindowisnotcurrentlyinpreviewmode.
![Page 659: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/659.jpg)
Example
Thefollowingexampledisplaysthetitleofthedocumentcurrentlyinpreviewmode.Ifthereisnodocumentinpreviewmode,amessageisdisplayedtotheuser.
SubPreviewDocument()
'Displaysthetitleofthedocumentcurrentlyinpreviewmode
DimFPAppAsFrontPage.Application
DimobjPageWindowAsPageWindowEx
SetFPApp=FrontPage.Application
SetobjPageWindow=FPApp.ActivePageWindow
'Ifthepagewindowisinpreviewmode,displaythetitle
IfobjPageWindow.ViewMode=fpPageViewPreviewThen
MsgBox"Thetitleofthedocumentis:"_
&objPageWindow.PreviewDocument.Title
Else
MsgBox"Thepagewindowisnotinpreviewmode."
EndIf
EndSub
![Page 660: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/660.jpg)
ProductCodePropertyReturnsthegloballyuniqueidentifier(GUID)forMicrosoftFrontPage.Read-onlyString.
expression.ProductCode()
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 661: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/661.jpg)
Example
ThisstatementreturnstheProductIDforFrontPage.
mySystem=Application.ProductCode
![Page 662: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/662.jpg)
ProfileStringPropertyReturnsorsetsaStringthatrepresentsanentryintheMicrosoftWindowsregistryunderthefollowingsubkey:
HKEY_CURRENT_USER\Software\Microsoft\FrontPage\
expression.ProfileString(RegistrySection,RegistryKey)
expressionRequired.AnexpressionthatreturnsaSystemobject.
RegistrySectionRequiredString.Asubkeybelowthe"HKEY_CURRENT_USER\Software\Microsoft\FrontPage\"subkeyintheWindowsregistry.
RegistryKeyRequiredString.ThenameoftheentryinthesubkeyspecifiedbyszSection.Forexample,SoftwareorNetworkintheRegistryEditoraresubkeys.
![Page 663: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/663.jpg)
Example
Thefollowingexamplereturnsthevalueofthesubkey,0(zero),intheRecentlyUsedURLsentry.
NoteTorunthisexample,youmusthaverecentlyopenedapagethatexistsinoneofyourWebsites.
PrivateSubGetRegRecentlyUsedInfo()
DimmySecKeyAsString
DimmyRegKeyAsString
DimmyProfileAsString
mySecKey="HKEY_CURRENT_USER\Software"
mySecKey=mySecKey&_
"\Microsoft\FrontPage\Editor\RecentlyUsedURLs"
myRegKey="0"
myProfile=System.ProfileString(mySecKey,myRegKey)
EndSub
![Page 664: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/664.jpg)
PropertiesPropertyReturnsaPropertiescollectionthatrepresentsthepropertiesforthespecifiedobject.
expression.Properties
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 665: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/665.jpg)
Example
ThefollowingexampleaddsanewpropertyanddisplaysitontheactiveWebpage.
NoteTorunthisexample,youmusthaveaWebsitecalled"C:\MyDocuments\MyWebSites\RogueCellars"andafilecalled"Zinfandel.htm".Or,youmaysubstituteanalternativeWebsiteURLandfilename.
PrivateSubCopyrightAdd()
DimmyWebAsWebEx
DimmyCopyrightAsString
myCopyright="Copyright1999byRogueCellars"
SetmyWeb=Webs.Open("C:\MyDocuments\MyWebSites\RogueCellars")
myWeb.Activate
ActiveWeb.Properties.Add"Copyright",myCopyright
ActiveWeb.RootFolder.Files("Zinfandel.htm").Open
ActiveDocument.body.insertAdjacentText"BeforeEnd",_
ActiveWeb.Properties("Copyright")
ActivePageWindow.Save
ActiveWeb.Close
EndSub
![Page 666: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/666.jpg)
ReadOnlyPropertyReturnsaBooleanthatdeterminesifaspecifiedfieldhasread-onlypermissions.IfTrue,thefieldcannotbemodifiedbytheuser.Read-only.
expression.ReadOnly
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 667: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/667.jpg)
Example
Thefollowingexamplestoresthenamesanddefaultvaluesofallfieldswithread-onlypermissionsinthefirstlistoftheactiveWebsite.IftheactiveWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubFieldPermissions()
'Displaysread/writepermissionsofall
'fieldsinthelist.
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimobjFieldsAslistFields
DimstrPermsAsString
SetobjApp=FrontPage.Application
SetobjFields=objApp.ActiveWeb.Lists.Item(0).Fields
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjFields
'Iffieldisread-only,addtolist
IfobjField.ReadOnly=TrueThen
IfstrPerms=""Then
'iffirstvalueinstring
strPerms=objField.Name&"-"&_
objField.DefaultValue&vbCr
Else
'addvaluetostring
strType=strPerms&objField.Name&"-"&_
objField.DefaultValue&vbCr
EndIf
EndIf
NextobjField
Else
'displaymessagetouser
MsgBox"TheactiveWebsitecontainsnolists."
EndIf
EndSub
![Page 668: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/668.jpg)
![Page 669: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/669.jpg)
ShowAll
![Page 670: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/670.jpg)
ReadSecurityPropertyReturnsorsetsanFpListReadSecurityconstantthatrepresentswhichuserscanreadtheinformationinaspecifiedlist.Read/write.
FpListReadSecuritycanbeoneoftheseFpListReadSecurityconstants.fpListReadSecurityAllAlluserscanreadthelist.fpListReadSecurityOnlyOwnOnlythecreatorofthelistcanreadit.
expression.ReadSecurity
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 671: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/671.jpg)
Example
ThefollowingexamplechangesthereadpermissionsofalllistsoftypefpListBasicListintheactiveWebsitetofpListReadSecurityAll.AlluserscannowreadalllistsoftypefpListTypeBasicList.
NoteUsetheApplyChangesmethodtosaveanychangestothelist.
SubChangePermissions()
'ChangespermissionofallBasicListsinthecurrentWebsite
DimobjAppAsFrontPage.Application
DimobjListAsObject
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Cyclethrougheachlistandcheckforlisttype
ForEachobjListInobjLists
'Ifit'saBasicListthenchangepermissions
IfobjList.Type=fpListTypeBasicListThen
IfobjList.ReadSecurity<>fpListReadSecurityAllThen
objList.ReadSecurity=fpListReadSecurityAll
objList.ApplyChanges
EndIf
EndIf
Next
EndSub
![Page 672: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/672.jpg)
RecentFilePropertyReturnsorsetsaLongthatrepresentsthenumberofdaysthataneworrecentlymodifiedfileshowsupintheRecentlyAddedFileslistinReportsview.Forexample,iftheRecentFilepropertyissetto20,anewfileorafilethathasbeenmodifiedwillbeclassifiedasrecentforthefirst20daysofitsexistence.Read/write.
expression.RecentFile
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 673: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/673.jpg)
Remarks
UsetheOlderFilepropertytosetthenumberofdaysafileexistsinaWebsitewithoutbeingmodifiedbeforeitshowsupintheOlderFileslistinReportsview.
![Page 674: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/674.jpg)
Example
Thefollowingexamplepromptstheusertoenterthenumberofdaysafilecanexistwiththeclassificationrecent,andthensetstheRecentFilepropertytothatvalue.ThesubroutineSetRecentpromptstheuserforinput,performsavalidationontheinputdata,convertsittothecorrecttype,andsetstheRecentFilepropertytothenewvalue.Ifthevalueisofanincorrecttype,anerrormessageisdisplayedtotheuser.
SubFPRecentFile()
'Setsavaluethatdetermineshowlongafilecanbeclassifiedrecent
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
CallSetRecent(objApp)
EndSub
SubSetRecent(ByRefobjAppAsApplication)
'Setsthevaluethatdetermineshowlongafilewillbeclassifiedasrecent
DimvarNumAsVariant
DimlngNumAsLong
'Prompttheusertoenteravalue
varNum=InputBox("Enterthenumberofdaysafile"&_
"canexistbeforeitisclassifiedasold.")
'Checktoseethatthevalueisofthecorrecttype
IfIsNumeric(varNum)Then
'Ifit'snumeric,convertittoLong
lngNum=CLng(varNum)
'SettheRecentFilevaluetothenewvalue
objApp.RecentFile=lngNum
'Displaythenewsettinginformationtotheuser
MsgBox"TheRecentFilevaluewassetcorrectly."&vbCr&_
"Thenumberofdaysanewormodifiedfilewillbeclassifiedasrecentis"_
&lngNum&"."
Else
'Otherwise,displayanerrormessagetotheuser
MsgBox"Theinputvaluewasincorrect.",vbCritical
EndIf
EndSub
![Page 675: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/675.jpg)
![Page 676: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/676.jpg)
RequiredPropertyReturnsorsetsaBooleanthatdeterminesifthefieldisrequired.Ifthefieldisrequired,itcannotberemovedfromthecurrentlist.Read/write.
expression.Required
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 677: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/677.jpg)
Example
Thefollowingexampledisplaysthenamesanddefaultvaluesofallrequiredfieldsinthecurrentlist.IfnorequiredfieldsexistoriftheactiveWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubDisplayRequiredFields()
'Displaysthenamesanddefaultvalues
'ofallrequiredfieldsinthefirstlistof
'theweb.
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimobjFieldsAsListFields
DimstrReqAsString
DimBlnFoundAsBoolean
SetobjApp=FrontPage.Application
SetobjFields=objApp.ActiveWeb.Lists.Item(0).Fields
'setfoundflagtofalse
BlnFound=False
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjFields
'Iffieldisrequired,addtolist
IfobjField.Required=TrueThen
IfstrReq=""Then
'iffirstvalueinstring
strReq=objField.Name&"-"&_
objField.DefaultValue&vbCr
'Thelistcontainsatleast1requiredfield
BlnFound=True
Else
'addvaluetostring
strReq=strReq&objField.Name&"-"&_
objField.DefaultValue&vbCr
EndIf
EndIf
NextobjField
Else
'displaymessagetouser
MsgBox"Theactivewebcontainsnolists."
EndIf
IfBlnFound=TrueThen
MsgBox"Thecurrentlistcontainsthefollowingrequiredfields:"&_
vbCr&strReq
![Page 678: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/678.jpg)
Else
MsgBox"Thecurrentlistcontainsnorequiredfield(s)."
EndIf
EndSub
![Page 679: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/679.jpg)
ShowAll
![Page 680: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/680.jpg)
ReturnTypePropertyReturnsanFpFieldTypethatrepresentsthetypeoffield.
FpFieldTypecanbeoneofthefollowingFpFieldTypeconstants.
fpFieldAttachments ReturnsaListFieldAttachmentsobject.fpFieldChoice ReturnsaListFieldChoiceobject.fpFieldComputed ReturnsaListFieldComputedobject.fpFieldCounter ReturnsaListFieldCounterobject.fpFieldCurrency ReturnsaListFieldCurrencyobject.fpFieldDateTime ReturnsaListFieldDateTimeobject.fpFieldFile ReturnsaListFieldFileobject.fpFieldInteger ReturnsaListFieldIntegerobject.fpFieldLookup ReturnsaListFieldLookupobject.fpFieldMultiLine ReturnsaListFieldMultilineobject.fpFieldNumber ReturnsaListFieldNumberobject.fpFieldRatingScale ReturnsaListFieldRatingScaleobject.fpFieldSingleLine ReturnsaListFieldSingleLineobject.fpFieldTrueFalse ReturnsaListFieldTrueFalseobject.fpFieldURL ReturnsaListFieldURLobject.
expression.ReturnType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 681: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/681.jpg)
RevisionControlProjectPropertyReturnsorsetstheRevisionControlProjectproperty.Read/writeString.
expression.RevisionControlProject()
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 682: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/682.jpg)
Remarks
ArevisioncontrolprojectcaneitherbeaMicrosoftVisualSourceSafeproject,oraFrontPage-basedlockingproject.ForaVisualSourceSafecontrolproject,youmuststarttheRevisionControlProjectpropertywiththestring"$/";foraFrontPage-basedlockingcontrolproject,youmustsettheRevisionControlProjectpropertyto"<FrontPage-basedLocking>".
Toremoveasourcecontrolproject,settheRevisionControlProjectpropertytoanemptystring.
![Page 683: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/683.jpg)
Example
ThefollowingexamplesetstheRevisionControlProjectpropertyinaVisualSourceSafeproject.
PrivateSubSetRevisionControlProjectName()
DimmyWebAsWebEx
DimmyRevisionControlProjectAsString
SetmyWeb=ActiveWeb
myRevisionControlProject=_
"$/RogueCellars/RogueCellarsUpdate"
myWeb.RevisionControlProject=_
myRevisionControlProject
EndSub
![Page 684: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/684.jpg)
RootFolderPropertyReturnsaWebFolderobjectthatrepresentstheactiveWebExobject'sroot.
expression.RootFolder()
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 685: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/685.jpg)
Example
Thefollowingstatementreturnsthenameoftherootfolder.
ActiveWeb.RootFolder.Name
![Page 686: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/686.jpg)
RootNavigationNodePropertyReturnsaNavigationNodeobjectthatrepresentsthetop-levelnavigationnode.
expression.RootNavigationNode()
expressionRequired.AnexpressionthatreturnsaWebExobject.
![Page 687: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/687.jpg)
Remarks
YoucanusetheRootNavigationNodepropertytodeterminetherootnavigationnode.TheRootNavigationNodepropertyreturnstheNavigationNodeobjectfromwhichyoucanaccessallothernavigationnodesinaWebsite.TheRootNavigationNodeobjectiscreatedbydefaultwhenyoucreateaWebsiteandprovidesthebasisforthenavigationstructure,whichisaccessedthroughtheChildrencollection.ThefirstchildnodeofthenavigationstructureisthehomepageoftheWebsite.
![Page 688: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/688.jpg)
Example
Thefollowingexampleaddsaglobalnavigationnodetotherightofthehomenavigationnode.
PrivateSubAddNode()
DimmyRNodeAsNavigationNode
DimmyPageAsString
SetmyRNode=ActiveWeb.RootNavigationNode
myPage="http://myServer/myWeb/search.htm"
CallmyRNode.Children.Add(myPage,"Search",_
fpStructRightmostChild)
ActiveWeb.ApplyNavigationStructure
EndSub
![Page 689: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/689.jpg)
ShowAll
![Page 690: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/690.jpg)
SelectedFilesPropertyReturnsanarrayofWebFileobjectsrepresentingtheselectedfiles.
expression.SelectedFiles
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
![Page 691: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/691.jpg)
Remarks
YoumusthaveFoldersviewopeninMicrosoftFrontPageinordertoselectmultiplefilesandyoumustusetherightpanetoselectthefiles.FromFoldersviewyoucanselectmultiplefilesinasingleWebsiteorinmultipleWebsites.IfyoumustusePageview,youcanonlyselectonefileperWebsitefromtheleftpane.
Tip
YoucanusethefpWebViewFoldersconstantoftheViewModepropertytosettheviewtotheFoldersview.
![Page 692: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/692.jpg)
Example
Thefollowingexampleconcatenatesthenamesoftheselectedfiles.
NoteThedelimiterusedtoseparatethefilenamesinthevariablemySelNameisaspace.
PrivateSubGetSelectedFileNames()
DimmyWebWindowsAsWebWindows
DimmyWebWindowAsWebWindowEx
DimmySelFilesAsVariant
DimmySelFileAsWebFile
DimmySelNameAsString
DimmyCountAsInteger
SetmyWebWindows=WebWindows
mySelFiles=ActiveWebWindow.SelectedFiles
FormyCount=0ToUBound(mySelFiles)
SetmySelFile=mySelFiles(myCount)
mySelName=mySelName&""&mySelFile.Name
Next
EndSub
![Page 693: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/693.jpg)
SelectedFoldersPropertyReturnsanarrayofWebFolderobjectsrepresentingtheselectedfolders.
expression.SelectedFolders
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
![Page 694: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/694.jpg)
Remarks
YoumusthaveFoldersviewopeninMicrosoftFrontPageinordertoselectmultiplefoldersandyoumustusetherightpanetoselectthefolders.FromFoldersview,youcanselectmultiplefoldersinasingleWebsiteorinmultipleWebsites.IfyoumustusePageview,youcanonlyselectonefolderperWebsitefromthefoldersintheleftpane.
NoteIfyou'reprogrammaticallyselectingfolders,youcanusethefpWebViewFoldersconstantoftheViewModepropertytosettheviewtoFoldersview.
![Page 695: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/695.jpg)
Example
Thefollowingexampleconcatenatesthenamesoftheselectedfolders.
NoteThedelimiterusedtoseparatethefoldernamesinthevariablemySelNameisaspace.
PrivateSubGetSelectedFolderNames()
DimmyWebWindowsAsWebWindows
DimmyWebWindowAsWebWindowEx
DimmySelFoldersAsVariant
DimmySelFolderAsWebFolder
DimmySelNameAsString
DimmyCountAsInteger
SetmyWebWindows=WebWindows
mySelFolders=ActiveWebwindow.SelectedFolders
FormyCount=0ToUBound(mySelFolders)
SetmySelFolder=mySelFolders(myCount)
mySelName=mySelName&""&mySelFolder.Name
Next
EndSub
![Page 696: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/696.jpg)
ShowAll
![Page 697: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/697.jpg)
SharedBordersPropertyTrueifanysharedbordersareinusefortheWebExorWebFileobject.Read/writeVariant.
expression.SharedBorders(BorderIndex)
expressionRequired.AnexpressionthatreturnsaWebExorWebFileobject.
BorderIndexOptionalFpSharedBorders.TheborderindexcanbeoneoftheFpSharedBordersconstants.ThedefaultconstantisfpBorderTop.
FpSharedBorders Value DescriptionfpBorderTop 1 Setsaborderforthetopofapage.fpBorderLeft 2 Setsaborderfortheleftsideofapage.fpBorderRight 4 Setsaborderfortherightsideofapage.fpBorderBottom 8 Setsaborderforthebottomofapage.fpBorderAll 255or&HFF Setsbordersonallsidesofapage.
![Page 698: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/698.jpg)
Remarks
Sharedborders,suchastheconstantfpBorderLeft,canbeusedtosetindividualbordervalues.
NoteThedefaultsharedborderisusedifasharedborderisnotspecified.
![Page 699: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/699.jpg)
Example
ThefollowingexamplesetsthesharedborderfortheactiveWebsite.
PrivateSubSetSharedBorders()
DimmyPageAsPageWindowEx
ActiveWeb.SharedBorders(fpBorderLeft)=True
EndSub
![Page 700: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/700.jpg)
ShowAsPercentagePropertyReturnsorsetsaBooleanthatdeterminesifthevalueinthefieldwillbedisplayedasapercentage.Read/write.
expression.ShowAsPercentage
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 701: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/701.jpg)
Example
ThefollowingexamplesetstheShowAsPercentagepropertyofallfieldsoftypefpFieldNumbertoTrue.Thevaluesinthefieldswillnowappearaspercentages.
NoteUsetheApplyChangesmethodtoapplyanychangesmadetothelist.
SubDisplayAsPercentage()
'DisplaysallfieldsoftypefpFieldNumberas
'apercentage
DimobjAppAsFrontPage.Application
DimobjLstFldsAsListFields
DimstrNameAsString
DimobjLstFldAsObject
SetobjApp=FrontPage.Application
SetobjLstFlds=objApp.ActiveWeb.Lists.Item(0).Fields
'Cyclethroughlistsanddisplaysasapercentage
ForEachobjLstFldInobjLstFlds
IfobjLstFld.Type=fpFieldNumberThen
objLstFld.ShowAsPercentage=True
EndIf
NextobjLstFld
objApp.ActiveWeb.Lists.Item(0).ApplyChanges
EndSub
![Page 702: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/702.jpg)
ShowStartupDialogPropertyReturnsorsetsaBooleanthatdeterminesiftheNewtaskpanewillbedisplayedwhenMicrosoftFrontPageisstarted.
expression.ShowStartupDialog
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 703: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/703.jpg)
Remarks
TheShowStartuppropertyisglobal,meaningthatanychangeswillnottakeaffectuntilFrontPageisrestarted.
![Page 704: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/704.jpg)
Example
ThefollowingexamplesetstheShowStartupDialogpropertytoTrue.ThenexttimeFrontPageisstarted,theNewpanewillappear.
SubTaskPaneStartup()
'ModifestheStartuptaskpaneproperty
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
WithobjApp
'SettoTrue,thetaskpanewillappearonstartup
.ShowStartupDialog=True
EndWith
EndSub
![Page 705: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/705.jpg)
ShowUserNamesInResultsPropertyReturnsorsetsaBooleanthatdeterminesifthenamesofuserswhohavecompletedthesurveywillbevisible.Read/write.
expression.ShowUserNamesInResults
expressionRequired.AnexpressionthatreturnsaSurveyobject.
![Page 706: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/706.jpg)
Example
ThefollowingexamplesetstheShowUserNamesInResultspropertyforeachSurveyobjectintheactiveWebsitetoTrue,displayingthenamesofalluserswhocompletedthesurvey.
NoteUsetheApplyChangesmethodtosaveanychangesmadetothelist.
SubChangePermissions()
'ChangespermissionofallBasicListsinthecurrentWebsite
DimobjAppAsFrontPage.Application
DimobjListAsObject
DimobjListsAsLists
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
'Cyclethrougheachlistandcheckforlisttype
ForEachobjListInobjLists
'Ifit'saSurveythenchangepermissions
IfobjList.Type=fpListTypeSurveyThen
IfobjList.ShowUserNamesInResults<>TrueThen
objList.ShowUserNamesInResults=True
objList.ApplyChanges
EndIf
EndIf
Next
EndSub
![Page 707: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/707.jpg)
SlowPagePropertyReturnsorsetsaLongthatspecifiesthenumberofsecondsapagecantaketodownloadbeforeitisclassifiedasslow.PagesthatareclassifiedasslowappearintheSlowPageslistintheMicrosoftFrontPageReportsview.Read/write.
expression.SlowPage
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 708: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/708.jpg)
Remarks
TheSlowPagepropertyisusedinconjunctionwiththeConnectionSpeedpropertytodeterminethesimulateddownloadtimeofaWebpage.
![Page 709: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/709.jpg)
Example
ThefollowingexamplesetstheSlowPagepropertyto10seconds,indicatingthatallpagesthattakeover10secondstodownload(inthiscase,usinga56Kmodem)willbeclassifiedasslowintheFrontPageReportsview.
SubSetSlowPage()
'ModifiestheSlowPageproperty
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
WithobjApp
'Setvalueto10,slowpagestakeatleast10seconds
.SlowPage=10
'Setuser'sconnectionspeedto56Kmodem
.ConnectionSpeed=fpConnect56K
EndWith
EndSub
![Page 710: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/710.jpg)
StartNumberPropertyReturnsaLongthatrepresentsthestartingnumberforthenumberscaleinaratingscalefield.
expression.StartNumber
expressionRequired.AnexpressionthatreturnsaListFieldRatingScaleobject.
![Page 711: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/711.jpg)
SubjectPropertySetsorreturnsaStringthatrepresentsthesubjectofaWebpackage.
expression.Subject
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 712: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/712.jpg)
Example
ThefollowingexamplecreatesanewWebpackageandaddsthepage"test.htm"tothepackage,includingalldependenciesforthepage,andthensavesthenewWebpackage.
DimobjWebAsWebEx
DimobjPackageAsWebPackage
SetobjWeb=ActiveWeb
SetobjPackage=objWeb.CreatePackage("NewWebPackage")
WithobjPackage
.Author="JohnSmith"
.Company="FourthCoffee"
.Subject="ThisisanewWebpackageforFourthCoffee."
.AddobjWeb.Url&"/test.htm",fpDepsDefault
.Save"c:\NewWebPackage.fwp",True
EndWith
![Page 713: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/713.jpg)
SubTreePropertyReturnsaNavigationNodescollectionobjectthatrepresentsacollectionofallthenodesinthesubtreeofthecurrentnavigationnode.Asubtreeofanodeisdefinedasallnodeswhichareadjacenttoorattachedtotheparentnodeandappearbelowtheparentnodeinthetreehierarchy.
expression.SubTree
expressionRequired.AnexpressionthatreturnsaNavigationNodeobject.
![Page 714: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/714.jpg)
Example
ThefollowingexamplepromptstheusertoenterthenameofanavigationnodeinthecurrentWebsiteandreturnsthesubtreeforthatparticularnode.Ifthenodeisfound,itslabelpropertyvalueisaddedtoaStringcontainingthenamesofallnodesintheparentnode'ssubtree.TheStringstoredinthevariablestrSubNodesisdisplayedtotheuser.IfthenodeisnotfoundintheWebsite,amessageisdisplayedtotheuser.
SubDisplaySubTree()
'Returnsthesubtreeofagivennode
DimobjAppAsFrontPage.Application
DimobjNavNodeAsNavigationNode
DimobjNavNodesAsNavigationNodes
DimobjSubTreeAsNavigationNodes
DimobjSubNodeAsNavigationNode
DimstrAnsAsString'Userinput
DimblnFoundAsBoolean'Booleanfoundflag
DimintCountAsInteger'Integercounter
DimstrSubNodesAsString'Namesofallsubnodes
blnFound=False
intCount=0
SetobjApp=FrontPage.Application
'CreateareferencetotheNavigationNodescollection
SetobjNavNodes=objApp.ActiveWeb.AllNavigationNodes
'Prompttheusertoenterthenameofthenode
strAns=InputBox("Enterthenameofthenodeforwhich"&_
"youwanttoviewthesubtree.")
'Whilethenodeisnotfoundandtherearemorenodesinthetree
DoWhile(NotblnFound=True)And(intCount<=objNavNodes.Count-1)
'Compareuserinputwithnodelabel
IfTrim(strAns)=objNavNodes.Item(intCount).LabelThen
'Iffound,returnnode
SetobjNavNode=objNavNodes.Item(intCount)
'Setfoundflagtotrue
blnFound=True
Else
'Otherwiseincreasecounter,keepchecking
intCount=intCount+1
EndIf
Loop
IfblnFound=TrueThen
SetobjSubTree=objNavNode.SubTree
![Page 715: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/715.jpg)
ForEachobjSubNodeInobjSubTree
'Ifthestringisemptyorhasnotyetbeenset
IfstrSubNodes=""Then
strSubNodes=strSubNodes&objSubNode.Label
Else
'otherwiseaddnextnodelabletostring
strSubNodes=strSubNodes&","&vbCr&objSubNode.Label
EndIf
NextobjSubNode
'Displaynamesofallnodesinsubtree
MsgBox"Thenodesfoundinthesubtreeof"&objNavNode.Label&"are:"_
&vbCr&vbCr&strSubNodes&"."
Else
'Ifnotfound,displaymessagetouser
MsgBox"Thenavigationnode"&strAns&"wasnotfound."
EndIf
EndSub
![Page 716: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/716.jpg)
ShowAll
![Page 717: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/717.jpg)
SubViewModePropertyReturnsorsetsanFpWebSubViewconstantthatdeterminestheviewtypeinthecurrentsubwindow.Read/write.
FpWebSubViewcanbeoneoftheseFpWebSubViewconstants.fpWebSubViewFoldersChangethecurrentsubwindowviewtoFoldersview.fpWebSubViewNavigationChangethecurrentsubwindowtoNavigationview.fpWebSubViewNoneClosethecurrentsubwindow.
expression.SubViewMode
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
![Page 718: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/718.jpg)
Example
ThefollowingexamplepromptstheusertoopenthesubwindowinFoldersviewifthesubwindowisnotcurrentlyvisible.Ifthesubwindowiscurrentlyopen,theuserisnotpromptedandtheprogramends.
SubSubModeType()
'Modifiesthesubwindowviewmodeofthecurrentwebwindow
DimobjAppAsFrontPage.Application
DimobjWebwdwAsWebWindowEx
DimstrAnsAsString
SetobjApp=FrontPage.Application
SetobjWebwdw=objApp.ActiveWebWindow
'Checkifthesubwindowisopenorclosed
IfobjWebwdw.SubViewMode=fpWebSubViewNoneThen
strAns=MsgBox("Thesubwindowisnotvisible."&_
"Wouldyouliketoviewthesubwindow?",vbYesNo)
'Prompttheusertoopenthesubwindow
IfstrAns=vbYesThen
'ChangethesubwindowtoFolderview
objWebwdw.SubViewMode=fpWebSubViewFolders
EndIf
EndIf
EndSub
![Page 719: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/719.jpg)
SystemPropertyReturnstheSystemobject.
expression.System()
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 720: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/720.jpg)
Example
Thisstatementreturnsthecurrentoperatingsystem.
mySystem=Application.System.OperatingSystem
![Page 721: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/721.jpg)
TemplatePropertyReturnsorsetsaStringthatrepresentsthefilepathofthetemplateappliedtothedocumentlibrary.Read/write.
expression.Template
expressionRequired.AnexpressionthatreturnsaDocumentLibraryobject.
![Page 722: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/722.jpg)
Example
ThefollowingexamplecreatesareferencetoadocumentlibrarynamedNewLibraryanddisplaysthefilepathofthetemplateassociatedwiththelibrary.
SubTemplatePath()
'Displaysthefilepathofthetemplate
DimobjAppAsFrontPage.Application
DimobjListsAsLists
DimobjLibraryAsDocumentLibrary
SetobjApp=FrontPage.Application
SetobjLists=objApp.ActiveWeb.Lists
SetobjLibrary=objLists.Item("NewLibrary")
'Displaymessagetouser
MsgBox"Thefilepathofthetemplateassociatedwiththe"&_
"documentlibraryis"&objLibrary.Template&"."
EndSub
![Page 723: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/723.jpg)
ShowAll
![Page 724: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/724.jpg)
ThemePropertiesPropertyReturnstheThemeobjectforthespecifiedobject.
expression.ThemeProperties(PropertyIndex)
expressionAnexpressionthatreturnsaPageWindowEx,WebEx,orWebFileobject.
PropertyIndexOptionalFpThemeProperties.Returnsorsetsthethemeproperties.
FormoredetailedinformationontheindividualTypeconstantsshowninthefollowingtable,seethetablesandlistsintheApplyThememethod.
FpThemeProperties Value Description
fpThemeActiveGraphics 16or&H10 Returnstheactivegraphicsconstant.
fpThemeBackgroundImage 1 Returnsabackgroundimage.
fpThemeCSS 4096or&H1000 Returnsthecascadingstylesheet.
fpThemeDefaultSettings16777216or&H1000000
Returnsthethemeappliedtotheweb.
fpThemeName33554432or&H2000000
ReturnstheThemeNameconstant.
fpThemeNoBackgroundImage 0 Returnsabackgroundwithoutanimage.
fpThemeNoCSS 0Returnsthispropertyifacascadingstylesheethasnotbeensetorisnotwanted.
fpThemeNormalColors 0 Returnsthecolormodefornormalcolor.Returnsthegraphicsmodefor
![Page 725: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/725.jpg)
fpThemeNormalGraphics 0 normalgraphics.
fpThemePropertiesAll 4369or&H1111
Returnsallofthethemeproperties.Afterathemeisappliedtoanobject,thefpThemePropertiesAllpropertycombinesallthepropertiesappliedtotheobject.
fpThemePropertiesNone 0 Returnsnoneforthethemeproperties.
fpThemeVivdColors 256 Returnsthevividcolorsproperty.
![Page 726: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/726.jpg)
Example
Thefollowingexamplechecksthethemepropertiesforactivegraphics.Ifactivegraphicshavebeenapplied,thenvividcolorsareappliedinadditiontothethemepropertiesthatarealreadyappliedtotheactivepagewindow.Ifactivegraphicsaren'tapplied,thenactivegraphicsandvividcolorsarebothappliedtotheactivepagewindow.
PrivateSubGetThemeProperties()
DimmyPageWindowAsPageWindowEx
SetmyPageWindow=ActiveWeb.ActiveWebWindow.ActivePageWindow
IfmyPageWindow.ThemeProperties(fpThemeActiveGraphics)Then
myPageWindow.AppyTheme(fpThemePropertiesAll+_
fpThemeVividColors)
ExitSub
Else
myPageWindow.ApplyTheme(fpThemePropertiesAll+_
fpThemeActiveGraphics+fpThemeVividColors)
EndIf
EndSub
Thefollowingexampleaddsabackgroundpicturetothespecifiedfile.
PrivateSubAddBackgroundImage()
DimmyFileAsWebFile
SetmyFile=Webs(0).Rootfolder.Files("index.htm")
IfmyFile.ThemeProperties(fpThemeBackgroundImage)=0Then
myFile.ApplyThememyFile.ThemeProperties(fpThemeName),_
myfile.ThemeProperties(fpThemePropertiesAll)+_
fpThemeBackgroundImage
EndIf
EndSub
![Page 727: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/727.jpg)
ThemesPropertyReturnsaThemescollectionthatrepresentsthethemesavailableforthespecifiedobject.
expression.Themes
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliestolist.
![Page 728: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/728.jpg)
Remarks
TheThemespropertyasappliedtotheApplicationobjectreturnsthecollectionofthemesavailabletobeapplied.WhentheThemespropertyisappliedtotheWebExobject,itreturnsthecollectionofthemesthathavebeenappliedtotheWebsite.ThisisthesameasthelistthatappearsintheWeb’s_themedirectory.IfathemeisappliedtoaWebExobject,therewillbeonethemeinthecollection.However,ifapageinaWebsitehasitsowntheme,separatefromthethemethatwasappliedtotheWebsite,thentheThemescollectionfortheWebExobjectwillhavetwothemesinit—thethemethatwasoriginallyappliedtotheWebsite,andthethemethatwasappliedspecificallytothepage.
![Page 729: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/729.jpg)
Example
Thefollowingexamplesearchesforaspecificthemeamongthethemesthatareavailablelocallyontheclient,aswellasthethemesappliedtotheactiveWebsite.
PrivateSubSearchAllThemes()
DimmyThemeAsTheme
DimmyThemeToFindAsString
DimmyIsFoundAsBoolean
myThemeToFind="blends"
myIsFound=False
ForEachmyThemeInApplication.Themes
IfmyTheme.Label=myThemeToFindThen
myIsFound=True
ExitFor
EndIf
Next
ForEachmyThemeInActiveWeb.Themes
IfmyTheme.Label=myThemeToFindThen
myIsFound=True
ExitFor
EndIf
Next
EndSub
![Page 730: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/730.jpg)
TitlePropertyReturnsthetitleofthespecifiedobject.Read-onlyorread/writeStringdependingonthespecifiedobject.
expression.Title
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliestolist.
![Page 731: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/731.jpg)
Remarks
FortheWebExandWebFileobjectstheTitlepropertyreturnsthetitleoftheactiveWebExobjectasaread/writeString.
![Page 732: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/732.jpg)
Example
Atthesametimeasyou'retraversingthenavigationnodes,youcanalsoreturnthetitle(filename)ofthefilethat'sassociatedwithaparticularnode.ThefollowingexamplereturnsthetitleofthefileassociatedwithanavigationnodeintheactiveWebsite.
PrivateSubGetFileFromNavNode()
DimmyWebAsWebEx
DimmyNavNodeAsNavigationNode
DimmyFileFromNavNodeAsString
SetmyWeb=ActiveWeb
SetmyNavNode=_
myWeb.RootNavigationNode.File.NavigationNode
WithmyNavNode
myFileFromNavNode=.File.Title
EndWith
EndSub
ThefollowingexampleshowshowyoucansetthetitleofthefirstfileintheWebsite.
PrivateSubSetTitle()
DimmyWebAsWebEx
DimmyNewTitleAsString
DimmyFileAsWebFile
MyNewTitle="Inventory.htm"
SetmyWeb=ActiveWeb
SetmyFile=myWeb.RootFolder.Files(0)
MyFile.Title=myNewTitle
EndSub
![Page 733: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/733.jpg)
ShowAll
![Page 734: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/734.jpg)
TypePropertyTypepropertyasitappliestotheBasicList,DocumentLibrary,List,and
Surveyobjects.
ReturnsanFpListTypeconstantthatrepresentsthetypeofthecurrentlist.Read-only.
FpListTypecanbeoneoftheseFpListTypeconstants.fpListTypeBasicListfpListTypeDocumentLibraryfpListTypeSurveyfpListTypeDiscussion
expression.Type
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
TypepropertyasitappliestoallotherobjectsintheAppliesTolist.
ReturnsanFpFieldTypeconstantthatrepresentsthetypeofthecurrentfield.Read-only.
FpFieldTypecanbeoneoftheseFpFieldTypeconstants.fpFieldAttachmentsfpFieldChoicefpFieldComputedfpFieldCounterfpFieldCurrencyfpFieldDateTimefpFieldFilefpFieldIntegerfpFieldLookupfpFieldMultiLine
![Page 735: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/735.jpg)
fpFieldNumberfpFieldRatingScalefpFieldSingleLinefpFieldTrueFalsefpFieldURL
expression.Type
expressionRequired.Anexpressionthatreturnsoneoftheobjectsasmentionedabove.
![Page 736: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/736.jpg)
Example
AsitappliestotheBasicList,DocumentLibrary,List,andSurveyobjects.
ThefollowingexampledisplaysthenamesofalllistsintheactiveWebsiteandtheirassociatedtypenames.IftheactiveWebsitecontainsnolists,amessageisdisplayedtotheuser.
SubViewListTypes()
'Displaysthenameofthelistand
'itsassociatedtype
DimlstWebListAsList
DimstrTypeAsString
IfNotActiveWeb.ListsIsNothingThen
'Cyclethroughlists
ForEachlstWebListInActiveWeb.Lists
'addtypestostring
IfstrType=""Then
strType=lstWebList.Name&"-"&_
lstWebList.Type&vbCr
Else
strType=strType&lstWebList.Name&"-"&_
lstWebList.Type&vbCr
EndIf
Next
'Displaytypesofalllistsintheweb
MsgBox"Thelisttypesinthecurrentwebare:"_
&vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"Thecurrentwebcontainsnolists."
EndIf
EndSub
AsitappliestotheListFieldobject.
ThefollowingexampledisplaysthenamesofallfieldsinthefirstlistoftheListscollectionandtheirassociatedtypenames.IftheactiveWebsitecontainsnolists,amessageisdisplayedtotheuser.
![Page 737: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/737.jpg)
SubFieldtype()
'Displaysthefieldtypesofthecurrentlist
DimobjAppAsFrontPage.Application
DimobjFieldAsListField
DimstrTypeAsString
SetobjApp=FrontPage.Application
IfNotActiveWeb.ListsIsNothingThen
ForEachobjFieldInobjApp.ActiveWeb.Lists.Item(0).Fields
IfstrType=""Then
strType=objField.Name&"-"&_
objField.Type&vbCr
Else
strType=strType&objField.Name&"-"&_
objField.Type&vbCr
EndIf
NextobjField
MsgBox"Thenamesofthefieldsinthislistandtheirtypesare:"&_
vbCr&strType
Else
'Otherwisedisplaymessagetouser
MsgBox"ThecurrentWebsitecontainsnolists."
EndIf
EndSub
![Page 738: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/738.jpg)
UrlPropertyReturnstheURLforthespecifiedobject.Read-onlyString.
expression.Url
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliestolist.
![Page 739: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/739.jpg)
Remarks
URLscanbeabsoluteorrelative.AnabsoluteURLcontainstheexactpathtothespecifiedobjectwhilearelativeURLmaycontaincharacterssuchas"../..","?",or";"dependingontheURLaccessschemeusedtoparsetherelativeURL.TheMicrosoftFrontPageobjectmodelalwaysusesabsoluteURLs.FormoreinformationonURLs,seeUnderstandingAbsoluteandRelativeURLsinFrontPage.
![Page 740: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/740.jpg)
Example
ThefollowingexamplereturnstheURLofthefirstfileintherootfolderoftheactiveWebsite.
PrivateSubGetFileUrl()
DimmyFileAsWebFile
DimmyURLAsString
SetmyFile=ActiveWeb.RootFolder.Files(0)
myURL=myFile.Url
EndSub
![Page 741: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/741.jpg)
UserNamePropertyReturnsthelogonnameoftheuserthatiscurrentlyloggedontothenetworkoroperatingsystem.Read/writeString.
expression.UserName
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 742: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/742.jpg)
Remarks
TheUserNamepropertyisthedefaultparameterwheneverausernameisrequiredforaparameterintheWebObjectModel.Forexample,theWebs.OpenandWebs.PublishmethodsbothrequireaUserNameparameter.Whentheparameterisn'tspecified,thedefaultparameteristheusernameoftheusercurrentlyloggedon.
![Page 743: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/743.jpg)
Example
Thefollowingexamplereturnsthecurrentuser'slogonname.
myLogonName=Application.UserName
![Page 744: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/744.jpg)
VBEPropertyReturnsaVBEobjectthatrepresentstheMicrosoftVisualBasicEditor.
expression.VBE
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 745: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/745.jpg)
Example
ThefollowingexamplecreatesareferencetotheVisualBasicEditoranddisplaysthenameoftheactiveprojecttotheuser.
SubReturnVBE()
'CreatesareferencetotheVBEanddisplaysamessagetouser
DimobjAppAsFrontPage.Application
SetobjApp=FrontPage.Application
'Displaythenameoftheactiveproject
MsgBox"Thenameoftheactiveprojectis:"&_
objApp.VBE.ActiveVBProject.Name
EndSub
![Page 746: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/746.jpg)
VersionPropertyReturnstheversionofthespecifiedobjectwiththeformat:"x.x.x",wherexrepresentsanumberintheversion.Read-onlyString.
expression.Version()
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 747: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/747.jpg)
Remarks
IftheApplicationobjectisspecified,theVersionpropertyreturnstheversionoftheapplication.WhentheVersionpropertyfortheSystemobjectisaccessed,itreturnsthecurrentversionoftheoperatingsystemasyoumightseeusedonthePropertiespageoftheSystemdialogbox.
![Page 748: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/748.jpg)
Example
Thefollowingexamplereturnstheversionoftheapplication.
PublicSubGetAppVersion()
DimmyAppVersionAsString
myAppVersion=Application.Version
EndSub
![Page 749: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/749.jpg)
VerticalResolutionPropertyReturnstheverticalresolutionofthescreeninpixels.Read-onlyLong.
expression.VerticalResolution()
expressionRequired.AnexpressionthatreturnsaSystemobject.
![Page 750: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/750.jpg)
Example
Thisexamplereturnstheverticalresolutionofthescreen.
myVerticalRes=System.VerticalResolution
![Page 751: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/751.jpg)
ShowAll
![Page 752: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/752.jpg)
ViewModeProperty(WebObjectModel)
ViewModepropertyasitappliestothePageWindowExobject.
ReturnsorsetsanFpPageViewModeconstantthatrepresentstheviewmodeoftheactivepagewindow.Read/write.
FpPageViewModecanbeoneoftheseFpPageViewModeconstants.fpPageViewNoFramesfpPageViewNormalfpPageViewNoWindowfpPageViewPreviewfpPageViewDefaultfpPageViewHtml
expression.ViewMode
expressionRequired.AnexpressionthatreturnsaPageWindowExobject.
ViewModepropertyasitappliestotheWebWindowExobject.
ReturnsorsetsanFpWebViewModeconstantthatdefinestheviewmodeofthecurrentwindow.Read/write.
FpWebViewModecanbeoneoftheseFpWebViewModeconstants.fpWebViewAllFilesfpWebViewBrokenLinksfpWebViewFoldersfpWebViewLinksfpWebViewPagefpWebViewSiteSummaryfpWebViewStructure
![Page 753: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/753.jpg)
fpWebViewTodo
expression.ViewMode
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
ViewModepropertyasitappliestotheFPHTMLDocumentandIFPDocumentobjects.
ReturnsaLongthatrepresentstheviewmodeofthedocument.Read-only.
expression.ViewMode(ViewMode)
expressionRequired.AnexpressionthatreturnsanFPHTMLDocumentorIFPDocumentobject.
ViewModeRequiredLong.Thenewviewingmode.
![Page 754: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/754.jpg)
Example
AsitappliestothePageWindowExobject.
ThefollowingexamplechangestheviewmodeoftheactivewindowtothevaluefpPageViewNormal(Designview)ifitisnotalreadyinthedefaultviewmode.
SubChangeViewMode()
'Changestheviewmodeoftheactivewindow
DimfpAppAsFrontPage.Application
DimobjPageAsPageWindowEx
SetfpApp=FrontPage.Application
SetobjPage=fpApp.ActivePageWindow
IfobjPage.ViewMode<>fpPageViewDefaultThen
objPage.ViewMode=fpPageViewNormal
MsgBox"Thecurrentpagewindowhasbeenrestored"&_
"tonormalview."
EndIf
EndSub
AsitappliestotheWebWindowExobject.
ThefollowingexamplechangestheviewmodeoftheactiveWebsitewindowtofpWebBrokenLinks(BrokenLinksview)ifthewindowisnotalreadyintheview.
SubChangeViewMode()
'Changestheviewmodeoftheactivewindow
DimfpAppAsFrontPage.Application
DimobjWebWindowAsWebWindowEx
SetfpApp=FrontPage.Application
SetobjWebWindow=fpApp.ActiveWebWindow
IfobjWebWindow.ViewMode<>fpWebViewBrokenLinksThen
objWebWindow.ViewMode=fpWebViewBrokenLinks
MsgBox"Thecurrentpagewindowhasbeenrestored"&_
![Page 755: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/755.jpg)
"toBrokenLinksview."
EndIf
EndSub
AsitappliestotheFPHTMLDocumentobject.
Thefollowingexampledisplaystheviewmodeoftheactivedocument.
SubDisplayViewMode()
'Changestheviewmodeoftheactivewindow
DimfpAppAsFrontPage.Application
DimobjDocAsFPHTMLDocument
SetfpApp=FrontPage.Application
SetobjDoc=fpApp.ActiveDocument
SelectCaseobjDoc.ViewMode
Case1
MsgBox"ThedocumentisinNormalmode."
Case2
MsgBox"ThedocumentisinHTMLmode"
Case8
MsgBox"ThedocumentisinPreviewmode"
EndSelect
EndSub
![Page 756: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/756.jpg)
ShowAll
![Page 757: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/757.jpg)
ViewModeExPropertyReturnsorsetsanFpWebViewModeExenumeratedconstantthatrepresentsthecurrentviewmodeoftheWebsitewindow.Read/write.
FpWebViewModeExcanbeoneoftheseFpWebViewModeExconstants.fpWebViewExAccessibilityfpWebViewExAllFilesfpWebViewExAssignedTofpWebViewExBrokenLinksfpWebViewExBrowserTypesfpWebViewExCategoriesfpWebViewExCheckoutStatusfpWebViewExComponentErrorsfpWebViewExCSSLinksfpWebViewExDailyPageHitsfpWebViewExDailySummaryfpWebViewExFoldersfpWebViewExLinksfpWebViewExMasterPagesfpWebViewExMonthlyPageHitsfpWebViewExMonthlySummaryfpWebViewExNavigationfpWebViewExOlderFilesfpWebViewExOsTypesfpWebViewExPagefpWebViewExPublishStatusfpWebViewExRecentlyAddedFilesfpWebViewExRecentlyChangedFilesfpWebViewExReferringDomainsfpWebViewExReferringURLsfpWebViewExRemoteSite
![Page 758: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/758.jpg)
fpWebViewExReviewStatusfpWebViewExSearchStringsfpWebViewExSharedBordersfpWebViewExSiteSummaryfpWebViewExSlowPagesfpWebViewExThemesfpWebViewExTodofpWebViewExUnlinkedFilesfpWebViewExUsageSummaryfpWebViewExVisitingUsersfpWebViewExWeeklyPageHitsfpWebViewExWeeklySummary
expression.ViewModeEx
expressionRequired.AnexpressionthatreturnsaWebWindowExobject.
![Page 759: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/759.jpg)
Example
Thefollowingexamplechangestheviewmodetodisplaythedailypagehits.
SubViewPageHits()
'Changesthecurrentviewmodetoviewpagehits
ActiveWeb.ActiveWebWindow.ViewModeEx=fpWebViewExDailyPageHits
EndSub
![Page 760: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/760.jpg)
ViewPagesPropertyRreturnsaStringarraythatrepresentsalistofpagesthatcontainaviewforthelist.
expression.ViewPages
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 761: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/761.jpg)
VisiblePropertyReturnsorsetsthevisiblestateofthePageWindowExorWebWindowExobject.ThevisiblestateforthePageWindowExobjectisread-onlyBoolean.ThevisiblestatefortheWebWindowExobjectisread/writeBoolean.
expression.Visible
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 762: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/762.jpg)
Example
Inthefollowingexample,theGetVisibleStateprocedurereturnsthevisiblestateofthefirstPageWindowExobjectfromtheCheckIfVisiblefunction.
PrivateSubGetVisibleState()
DimmyIsVisibleAsBoolean
myIsVisible=CheckIfVisible
EndSub
FunctionCheckIfVisible()AsBoolean
DimmyPageAsPageWindowEx
DimmyVisibleStateAsBoolean
SetmyPage=Application.Webs(0).WebWindows(0).PageWindows(0)
myVisibleState=myPage.Visible
CheckIfVisible=myVisibleState
EndFunction
ThefollowingexamplesetsthevisiblestateofaWebWindowExobjecttoawindowlessstate.
PrivateSubOpenInNoWindow()
DimmyWebWindowAsWebWindowEx
SetmyWebWindow=Webs(0).WebWindows(0)
myWebWindow.Visible=False
EndSub
![Page 763: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/763.jpg)
WebPropertyReturnsaWebExobjectthatrepresentsaMicrosoftFrontPageWebsite.
expression.Web
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 764: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/764.jpg)
Example
ThefollowingexamplereturnsthetitleoftheactiveWebsite.
PrivateSubGetWebTitle()
DimmyWebAsWebEx
DimmyWebNameAsString
SetmyWeb=ActiveWeb
myWebName=myWeb.RootFolder.Web.Title
EndSub
![Page 765: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/765.jpg)
WebsPropertyReturnsthecollectionofopenWebsitesforthespecifiedobject.
expression.Webs
expressionRequired.AnexpressionthatreturnsanApplicationobject.
![Page 766: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/766.jpg)
Example
ThefollowingexamplecreatesanarraythatcontainsalloftheURLsforalltheopensubsitesinyourWebsite.
NoteYoumustopenanyWebsitesforwhichyouwishtoretrievetheURLs.
PrivateSubGetWebs()
DimmyWebsAsWebs
DimmyWebAsWebEx
DimmyOpenWebs()AsVariant
DimiAsInteger
DimmyWebCountAsInteger
SetmyWebs=Application.Webs
myWebCount=myWebs.Count
ReDimmyOpenWebs(myWebCount)
Do
ForEachmyWebInmyWebs
myOpenWebs(i)=myWeb.Url
i=i+1
Next
LoopUntili>myWebCount
EndSub
![Page 767: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/767.jpg)
WebWindowsPropertyReturnsthecollectionofopenWebWindowsobjectsinthespecifiedobject.
expression.WebWindows
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 768: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/768.jpg)
Example
ThefollowingexamplechecksifanyoftheWebwindowsaresettoPageview,andchangesthosethatareinPageviewtoFoldersview.
PrivateSubGetViewModes()
DimmyWebWindowsAsWebWindows
DimmyWebWindowAsWebWindowEx
DimmyViewAsFpWebViewMode
SetmyWebs=Webs
SetmyWebWindows=myWebs.WebWindows
ForEachmyWebWindowInmyWebWindows
myView=myWebWindow.ViewMode
IfmyView=fpWebViewPageThen
myWebWindow.ViewMode=fpWebViewFolders
EndIf
Next
EndSub
![Page 769: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/769.jpg)
OnActivateEventOccurswhenthepagewindoworWebwindowobtainsthefocusandbecomesthecurrentwindow.
PrivateSubexpression_OnActivate()
expressionAvariablewhichreferencesanobjectoftypePageWindowExorWebWindowExdeclaredwitheventsinaclassmodule.
![Page 770: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/770.jpg)
Example
ThefollowingexampleusestheIsDirtypropertytodetermineifthepageshowninthespecifiedwindowhaschangedsincethelastrefreshorsaveandsavesthedocumentthathaschanged.
PrivateSubPageWindowEx_OnActivate()
'Displaysamessagewhenthewindowobtainsfocus
IfPageWindowEx.IsDirtyThen
PageWindowEx.Save
EndIf
EndSub
![Page 771: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/771.jpg)
OnAfterPageSaveEventOccursafterapageissaved.
PrivateSubApplication_OnAfterPageSave(ByValpPageAsPageWindowEx,SuccessAsBoolean)
pPageRequiredPageWindowExobject.
SuccessRequiredBoolean.TrueifthePageWindowExobjectwassuccessfullysaved.
![Page 772: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/772.jpg)
Remarks
TheOnAfterPageSaveeventisassociatedwiththeApplicationobject.AftertheusersavesapageorclosesMicrosoftFrontPage,theOnAfterPageSaveeventfiresandexecutesthecodethatyouspecifiedwithintheeventprocedure.
![Page 773: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/773.jpg)
Example
Thefollowingexampledisplaysamessageboxafterthepagehasbeensavedanddisplaysthefilenameofthepage.
NoteTorunthisexample,youmusthaveatleastoneopenWebsiteandoneopenpagewithinthatWebsite.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdSaveandabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdSave_Click()
DimmyPageWindowAsPageWindowEx
SetmyPageWindow=ActiveWeb.ActiveWebWindow.ActivePageWindow
myPageWindow.Save
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnAfterPageSave(ByValpPageAs_
PageWindow,SuccessAsBoolean)
IfSuccess=TrueThen
MsgBox"Thefollowingpagewassaved:"&pPage.File.Name
Else
MsgBox"Therewasaproblemwithsavingyourpage:"&_
pPage.File.Name
EndIf
EndSub
![Page 774: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/774.jpg)
![Page 775: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/775.jpg)
OnAfterPageWindowViewChangeEventOccurswhenapagewindowhasswitchedviewtypes.
PrivateSubexpression_OnAfterPageWindowViewChange(ByValpPageAsPageWindowEx)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageThePageWindowExobjectinwhichtheviewhaschanged.
![Page 776: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/776.jpg)
Example
Thefollowingexamplepromptstheusertorefreshthewindowafterithaschangedviewmodes.
PrivateSubobjApp_OnAfterPageWindowViewChange(ByValpPageAsPageWindowEx)
'Occurswhenaviewchanges
DimstrAnsAsString
'Promptusertorefreshview
strAns=MsgBox("Theviewhaschanged,wouldyouliketorefreshthewindow?",vbYesNo)
IfstrAns=vbYesThen
pPage.Refresh
EndIf
EndSub
![Page 777: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/777.jpg)
OnAfterPublishEventOccursafteraWebsiteispublished.
PrivateSubexpression_OnAfterPublish(SuccessAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypeWebExdeclaredwitheventsinaclassmodule.
SuccessABooleanthatdeterminesifthepublishoperationwassuccessful.IfTrue,thentheWebsitewassuccessfullypublished.
![Page 778: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/778.jpg)
Example
ThefollowingexampledisplaysamessagetotheuserbasedontheresultofthePublishmethod.
PrivateSubobjWeb_OnAfterPublish(SuccessAsBoolean)
'Occursafterawebispublished
IfSuccess=TrueThen
MsgBox"Thewebwaspublishedsuccessfully."
Else
MsgBox"Anerroroccurred,thewebwasnotpublished.",vbExclamation
EndIf
EndSub
![Page 779: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/779.jpg)
OnAfterSaveEventOccursaftertheactivedocumenthasbeensavedbytheuser.
PrivateSubexpression_OnAfterSave(SuccessAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypePageWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
SuccessABooleanthatindicatesiftheoperationwassuccessful.IfTrue,thefilewassaved.
![Page 780: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/780.jpg)
Example
Theeventinthefollowingexampleoccursaftertheactivedocumentissavedinanextendedpagewindow.Amessageisdisplayedtotheuserbasedontheresultoftheoperation.
PrivateSubPageWindowEx_OnAfterSave(SuccessAsBoolean)
'DisplaysmessagebasedonvalueofSuccess
IfSuccess=TrueThen
MsgBox"Thefile"&PageWindowEx.ActiveDocument.Title&"wassaved."
Else
MsgBox"Thefile"&PageWindowEx.ActiveDocument.Title&"wasnotsaved."
EndIf
EndSub
![Page 781: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/781.jpg)
OnAfterSubViewChangeEventOccursaftertheWebwindowsubviewchanges.
PrivateSubexpression_OnAfterSubViewChange()
expressionAvariablenamewhichreferencesanobjectoftypeWebWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
![Page 782: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/782.jpg)
Example
ThefollowingexampledisplaysamessagetotheuserwheneverthesubviewoftheactiveWebsitewindowchangesorafterthesubviewcloses.
PrivateSubobjWebWindow_OnAfterSubViewChange()
'Displayamessageindicatingwhichviewthesubwindowiscurrentlyin
SelectCaseobjwebWindow.SubViewMode
CasefpWebSubViewFolders
MsgBox"TheviewinthesubwindowhaschangedtoFolderView."
CasefpWebSubViewNavigation
MsgBox"TheviewinthesubwindowhaschangedtoNavigationView."
CasefpWebSubViewNone
MsgBox"Thesubwindowhasclosed."
EndSelect
EndSub
![Page 783: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/783.jpg)
OnAfterViewChangeEventOccursaftertheviewhaschangedintheactivepagewindoworWebsitewindow.
PrivateSubexpression_OnAfterViewChange()
expressionAvariablenamewhichreferencesanobjectintheAppliesTolistdeclaredusingtheWithEventskeywordinaclassmodule.
![Page 784: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/784.jpg)
Example
Thefollowingexampledisplaysthenameofthenewpagewindowviewmode.
PrivateSubPageWindowEx_OnAfterViewChange()
'Occurswhentheviewchangesintheactivewindow
MsgBox"Thepagehaschangedto"&PageWindowEx.ViewMode&"."
EndSub
![Page 785: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/785.jpg)
OnAfterWebPublishEventOccursafteraWebsiteispublished.
PrivateSubexpression_OnAfterWebPublish(ByValpWebAsWebEx,SuccessAsBoolean)
expressionAvariablenamewhichreferencesanobjectintheAppliesTolistdeclaredusingtheWithEventskeywordinaclassmodule.
pWebRequiredWebEx.ThespecifiedWebExobject.
SuccessRequiredBoolean.TrueifthespecifiedWebwassuccessfullypublished.
![Page 786: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/786.jpg)
Remarks
TheOnAfterWebPublisheventisassociatedwiththeApplicationobject.AftertheuserpublishesaWebsiteinMicrosoftFrontPage,theOnAfterWebPublisheventfiresandexecutesthecodethatyouspecifiedwithintheeventprocedure.
![Page 787: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/787.jpg)
Example
Thefollowingexamplecreatesapropertycalled"Published"withthevalueofTrueafteraWebsitehasbeenpublished.
NoteTorunthisexampleyoumusthaveoneWebsiteopen.ThisexampleusesaWebsitecalledRogueCellars.YoucancreateaWebsitecalledRogueCellars,oryoucansubstituteaWebsiteofyourchoiceinthefollowingcodesample.
CreateaformcalledfrmLaunchEvents.frmandaddtwocommandbuttons,abuttoncalledcmdPublishWeb,andabuttoncalledcmdCancel.Thenaddthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdPublishWeb_Click()
ActiveWeb.Publish"C:\MyDocuments\MyWebSites\RogueCellars"
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnAfterWebPublish(ByValpWebAsWebEx,SuccessAsBoolean)
IfSuccess=TrueThen
pWeb.Properties.Add"Published",True
pWeb.Properties.ApplyChanges
Else
MsgBox"Therewasaproblempublishingyour"&pWeb&"web."
![Page 788: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/788.jpg)
EndIf
EndSub
![Page 789: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/789.jpg)
OnAfterWebWindowSubViewChangeEventOccursaftertheFolderListintheWebviewsubwindowhaschangedfromFoldersviewtoNavigationview.
PrivateSubapplication__OnAfterWebWindowSubViewChange(ByValpWebWindowAsWebWindowEx)
applicationAnobjectoftypeApplicationdeclaredwitheventsinaclassmodule.
pWebWindowTheWebWindowExobjectinwhichtheviewhaschanged.
![Page 790: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/790.jpg)
Example
Thefollowingexampledisplaysthenameoftheviewtypeinthesubwindow,unlessthesubwindowisclosedbytheuser.
PrivateSubobjApp_OnAfterWebWindowSubViewChange(ByValpWebWindowAsWebWindowEx
'OccurswhenasubviewintheWebwindowchanges
'Displayamessageindicatingwhatviewthesubwindowiscurrentlyin
SelectCasepWebWindow.SubViewMode
CasefpWebSubViewFolders
MsgBox"TheviewinthesubwindowhaschangedtoFolderView."
CasefpWebSubViewNavigation
MsgBox"TheviewinthesubwindowhaschangedtoNavigationView."
CasefpWebSubViewNone
MsgBox"Thesubwindowhasclosed."
EndSelect
EndSub
![Page 791: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/791.jpg)
OnAfterWebWindowViewChangeEventOccursaftertheWebsitewindowviewhaschanged.
PrivateSubexpression_OnAfterWebWindowViewChange(ByValpWebWindowAsWebWindowEx)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebWindowTheWebWindowExobjectinwhichtheviewhaschanged.
![Page 792: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/792.jpg)
Example
Thefollowingexampledisplaysthenameofthenewviewtypetotheusereverytimetheviewischanged.
PrivateSubobjApp_OnAfterWebWindowViewChange(ByValpWebWindowAsWebWindowEx)
'OccursaftertheWebsitewindowviewchanges.
'Displaymessagetouser
MsgBox"Theviewhaschangedto"&pWebWindow.ViewModeEx&"mode."
EndSub
![Page 793: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/793.jpg)
OnBeforePageSaveEventOccursbeforeapageissaved.
PrivateSubexpression_OnBeforePageSave(ByValpPageAsPageWindowEx,SaveAsUIAsBoolean,CancelAsBoolean
expressionAvariablenamewhichreferencesanobjectoftypePageWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
pPageRequiredPageWindowEx.ThespecifiedPageWindowExobject.
SaveAsUIRequiredBoolean.TruewhentheSaveAsdialogboxisusedtosaveapage.Thiscanbethefirsttimethepageissavedorwhenthepageissavedasanewpage.Falsewhenwhenanexistingpageissaved.
CancelRequiredBoolean.CausesMicrosoftFrontPagetoabortthesavewhensettoTrue.WhenCancelisprogrammaticallysettoTrue,theusercanabortthesaveprocessbyclickingtheCancelbuttonontheform.DefaultisFalse.
![Page 794: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/794.jpg)
Remarks
TheOnBeforePageSaveeventisassociatedwiththeApplicationobject.WhentheusersavesapageorclosesFrontPage,theOnBeforePageSaveeventfiresandexecutesthecodethatyouspecifiedwithintheeventprocedure.
NoteIfyousetCanceltoTrue,thepagewon'tbesaved.
![Page 795: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/795.jpg)
Example
Thefollowingexampledisplaysamessageboxbeforethepagehasbeensavedanddisplaysthedocumenttitleofthefileforthepage.
NoteTorunthisexample,youmusthaveatleastoneopenWebsiteandoneopenpagewithinthatsite.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdSave,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdSave_Click()
DimmyPageWindowAsPageWindowEx
SetmyPageWindow=ActiveWeb.ActiveWebWindow.ActivePageWindow
myPageWindow.Save
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnBeforePageSave(ByValpPageAs_
PageWindowEx,SaveAsUIAsBoolean,CancelAsBoolean)
MsgBox"Thefollowingpagewillbesaved:"&pPage.File.Name_
&"willbesavedwiththetitle:"&pPage.Document.Title
![Page 796: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/796.jpg)
EndSub
![Page 797: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/797.jpg)
OnBeforePageWindowViewChangeEventOccursbeforethecurrentPagewindowviewischanged.
PrivateSubapplication__OnBeforePageWindowViewChange(ByValpPageAsPageWindowEx,ByValTargetViewAsFpPageViewMode,CancelAsBoolean)
applicationAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageThePageWindowExobjectinwhichtheviewhaschanged.
TargetViewThespecifiedtargetwindowtype.
CancelABooleanthatdeterminesiftheeventwillbecancelled.IfFalse,theeventwillnotbecancelled.IfTrue,theeventwillbecancelled.
![Page 798: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/798.jpg)
Remarks
Thiseventcanbecancelled.
![Page 799: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/799.jpg)
Example
Thefollowingexamplepromptstheuserbeforethecurrentviewischanged.TheCancelargumentismodifiedbasedontheuser'sresponse.
PrivateSubobjApp_OnBeforePageWindowViewChange(ByValpPageAsPageWindowEx,_
ByValTargetViewAsFpPageViewMode,CancelAsBoolean)
'Promptstheuserbeforechangingtheviewtype
DimstrAnsAsString
'Promptusertochangeview
strAns=MsgBox("Areyousureyouwanttochangethecurrentview?",_
vbYesNo)
IfstrAns=vbYesThen
'Don'tcancelevent
Cancel=False
Else
'Cancelevent
Cancel=True
EndSub
![Page 800: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/800.jpg)
OnBeforePublishEventOccursbeforeaWebsiteispublished.
PrivateSubexpression_OnBeforePublish(DestinationAsString,CancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypeWebExdeclaredusingtheWithEventskeywordinaclassmodule.
DestinationAStringthatspecifiestheURLofthepublishedWebsite.
CancelABooleanthatspecifieswhethertocancelthepublishoperation.TruecancelspublishingtheWebsite.
![Page 801: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/801.jpg)
Remarks
Thiseventcanbecancelled.
![Page 802: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/802.jpg)
Example
ThefollowingexampledisplaysamessagetotheuserbeforeaWebsiteispublished.Italsoallowstheusertocanceltheeventbeforeitoccurs.
PrivateSubexpression_OnBeforePublish(DestinationAsString,CancelAsBoolean)
'Occursbeforeawebispublished.
DimblnAnsAsBoolean
blnAns=MsgBox_
("Areyousureyouwanttopublishtothefollowingdestination:"&_
Destination)
IfblnAns=FalseThen
Cancel=True
Else
Cancel=False
EndIf
EndSub
![Page 803: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/803.jpg)
OnBeforeSaveEventOccursbeforeapageinanactiveextendedpagewindowissaved.
PrivateSubexpression_OnBeforeSave(SaveAsUIAsBoolean,CancelAsBoolean)
expressionAvariablenamethatreferencesanobjectoftypePageWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
SaveAsUIABooleanthatdeterminesiftheuserinterfacewillbedisplayed.IfTrue,theSaveAsdialogboxwillbedisplayed.
CancelABooleanthatdeterminesifthesaveoperationwillbecancelled.IfTrue,thedocumentwillnotbesaved.
![Page 804: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/804.jpg)
Example
Thefollowingexamplepromptstheuserbeforesavingthedocument.IftheuserclicksNo,thedocumentwillnotbesaved.IftheuserclicksYes,thedocumentwillbesaved.
PrivateSubPageWindowEx_OnBeforeSave(SaveAsUIAsBoolean,CancelAsBoolean)
'Promptuserbeforesavingthedocument
DimstrAnsAsString
strAns=MsgBox("Doyoureallywanttosavethedocument?",vbYesNo)
'Changecancelvaluebasedonuserinput
IfstrAns=VbNoThen
Cancel=True
EndIf
EndSub
![Page 805: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/805.jpg)
OnBeforeSubViewChangeEventOccursbeforethesubviewoftheWebsitewindowchanges.
PrivateSubexpression_OnBeforeSubViewChange(ByValTargetSubViewAsFpWebSubView,CancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypeWebWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
TargetSubViewAnFpWebSubViewenumeratedconstantthatrepresentsthenewsubviewtype.
CancelABooleanthatdeterminesiftheoperationwillbecancelled.IfFalse,thesubviewwillchangeviewtypes.
![Page 806: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/806.jpg)
Example
ThefollowingexamplepromptstheuserbeforechangingthesubviewoftheWebsitewindow.IftheuserclicksNo,thesubviewwillnotchange.IftheuserclicksYes,thesubviewwillchangetoanewviewtype.
PrivateSubobjwebWindow_OnBeforeSubViewChange
(ByValTargetSubViewAsFpWebSubView,CancelAsBoolean)
'Occurswhenthesubviewoftheactivewebwindowischanged
DimstrAnsAsString
'Promptuser
strAns=MsgBox("Areyousureyouwanttochangethesubview?",vbYesNo)
IfstrAns=vbYesThen
Cancel=False
Else
Cancel=True
EndIf
EndSub
![Page 807: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/807.jpg)
ShowAll
![Page 808: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/808.jpg)
OnBeforeViewChangeEventOnBeforeViewChangeeventasitappliestothePageWindowExobject.
Occursbeforetheviewmodeofthepagewindowchanges.
PrivateSubexpression_OnBeforeViewChange(ByValTargetViewAsFpPageViewMode,CancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypePageWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
TargetViewAnFpPageViewModeenumeratedconstantthatrepresentsthenewviewtype.
CancelABooleanthatdeterminesiftheoperationwillbecancelled.IfTrue,theviewwillnotbechanged.
OnBeforeViewChangeeventasitappliestotheWebWindowExobject.
OccursbeforetheviewmodeoftheWebsitewindowchanges.
PrivateSubexpression_OnBeforeViewChange(ByValTargetViewAsFpWebViewModeEx,CancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypeWebWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
TargetViewAnFpWebViewModeExenumeratedconstantthatrepresentsthenewviewtype.
CancelABooleanthatdeterminesiftheoperationwillbecancelled.IfTrue,theviewwillnotbechanged.
![Page 809: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/809.jpg)
Example
Thefollowingexamplepromptstheuserbeforechangingtheviewofthepagewindow.IftheuserclicksYes,theviewischanged.
PrivateSubPageWindowEx_OnBeforeViewChange(ByValTargetViewAsFpPageViewMode,_
CancelAsBoolean)
'Promptsuserbeforechangingviews
DimblnAnsAsBoolean
strAns=MsgBox("Areyousureyouwanttochangethecurrentview?",_
vbYesNo)
IfstrAns=vbYesThen
Cancel=False
Else
Cancel=True
EndIf
EndSub
![Page 810: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/810.jpg)
OnBeforeWebPublishEventOccursbeforeaWebsiteispublished.
PrivateSubexpression_OnBeforeWebPublish(ByValpWebAsWebEx,DestinationAsString,CancelAsBoolean)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebRequiredWebEx.ThespecifiedWebExobject.
DestinationRequiredString.TheURLofthetargetlocation.
CancelRequiredBoolean.CausesMicrosoftFrontPagetoabortthepublishwhensettoTrue.WhenCancelisprogrammaticallysettoTrue,theusercanabortthesaveprocessbyclickingtheCancelbuttonontheform.DefaultisFalse.
![Page 811: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/811.jpg)
Remarks
TheOnBeforeWebPublisheventisassociatedwiththeApplicationobject.WhentheuserpublishesaWebsiteinFrontPage,theOnBeforeWebPublisheventfiresandexecutesthecodewithintheeventprocedure.
![Page 812: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/812.jpg)
Example
ThefollowingexampleaddsacopyrightstringtotheindexpageofthespecifiedWebsite.
NoteTorunthisexample,youmusthaveatleastoneopenWebsite.ThisexampleusesaWebsitecalledRogueCellars.YoucancreateaWebsitecalledRogueCellarsoryoucansubstituteaWebsiteofyourchoiceinthefollowingcodesample.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdPublishWeb,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdPublishWeb_Click()
ActiveWeb.Publish"C:\MyDocuments\MyWebSites\RogueCellars"
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnBeforeWebPublish(ByValpWebAsWebEx,_
DestinationAsString,CancelAsBoolean)
DimmyCopyrightAsString
DimmyIndexFileAsWebFile
![Page 813: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/813.jpg)
myCopyright="Copyright1999byRogueCellars"
SetmyIndexFile=pWeb.RootFolder.Files("index.htm")
myIndexFile.Open
IfmyIndexFile.Application.ActiveDocument.body.outerText<>_
myCopyrightThen
myIndexFile.Application.ActiveDocument.body.insertAdjacentText_
"BeforeEnd",myCopyright
EndIf
ActivePageWindow.Close
EndSub
![Page 814: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/814.jpg)
OnBeforeWebWindowSubViewChangeEventOccursbeforethesubwindowofthecurrentWebwindowischangedbytheuser.
PrivateSubexpression_OnBeforeWebWindowSubViewChange(ByValpwebwindowAsWebWindowEx,ByValTargetSubViewAsFpWebSubView,CancelAsBoolean)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebWindowTheWebWindowExobjectthatcontainsthesubwindow.
TargetSubViewThesubwindowviewtype.
CancelABooleanthatdeterminesiftheeventwillbecancelled.IfFalse,theeventwillnotbecancelled.IfTrue,theeventwillbecancelled.
![Page 815: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/815.jpg)
Example
Thefollowingexamplepromptstheuserbeforechangingthecurrentsubwindowview.TheCancelargumentismodifiedbasedontheusers'response.
PrivateSubobjApp_OnBeforeWebWindowSubViewChange(ByValpwebwindowAsWebWindowEx,_
ByValTargetSubViewAsFpWebSubView,CancelAsBoolean)
'Occursbeforethewebwindowsubviewischanged.Promptstheusertoverifythechange
DimstrAnsAsString
'Prompttheuserbeforechangingviews
strAns=MsgBox("Areyousureyouwanttochangethesubwindowview?",_
vbYesNo)
IfstrAns=vbYesThen
'Yes,don'tcanceltheevent
Cancel=False
Else
'No,canceltheevent
Cancel=True
EndIf
EndSub
![Page 816: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/816.jpg)
OnBeforeWebWindowViewChangeEventOccursbeforetheWebsitewindowviewchanges.
PrivateSubexpression__OnBeforeWebWindowViewChange(ByValpWebWindowAsWebWindowEx,ByValTargetViewAsFpWebViewModeEx,CancelAsBoolean)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebWindowTheWebWindowExobjectthatcontainstheview.
TargetViewTheFPWebViewModeExwindowviewtype.
CancelABooleanthatdeterminesiftheeventwillbecancelled.IfFalse,theeventwillnotbecancelled.IfTrue,theeventwillbecancelled.
![Page 817: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/817.jpg)
Example
Thefollowingexamplepromptstheuserbeforechangingthecurrentview.TheCancelargumentismodifiedbasedontheusers'response.
PrivateSubobjApp_OnBeforeWebWindowViewChange(ByValpWebWindowAsWebWindowEx,_
ByValTargetViewAsFpWebViewModeEx,CancelAsBoolean)
'Occursbeforetheviewischangedinthewebwindow.Promptstheusertoverifythechange
DimstrAnsAsString
'Prompttheuserbeforechangingviews
strAns=MsgBox("Areyousureyouwanttochangetheviewmode?",_
vbYesNo)
IfstrAns=vbYesThen
'Yes,don'tcanceltheevent
Cancel=False
Else
'No,canceltheevent
Cancel=True
EndIf
EndSub
![Page 818: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/818.jpg)
ShowAll
![Page 819: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/819.jpg)
OnCloseEventOnCloseeventasitappliestothePageWindowExobject.
Occurswhentheactivepagewindowisclosedbytheuser.
PrivateSubexpression_OnClose(CancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypePageWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
CancelABooleanthatdeterminesiftheoperationwillbecancelled.Truecancelsclosingtheactivepagewindow.
OnCloseeventasitappliestotheWebExobject.
OccurswhentheactiveWebsitewindowisclosedbytheuser.
PrivateSubexpression_OnClose(pCancelAsBoolean)
expressionAvariablenamewhichreferencesanobjectoftypeWebExdeclaredusingtheWithEventskeywordaclassmodule.
CancelABooleanthatdeterminesiftheoperationwillbecancelled.TruecancelsclosingtheactiveWebsite.
![Page 820: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/820.jpg)
Example
Thefollowingexamplepromptstheuserbeforeclosingtheactivepagewindow.IftheuserclicksNo,thewindowwillnotclose.
PrivateSubPageWindowEx_OnClose(CancelAsBoolean)
'Displaysamessage
DimstrAnsAsString
'Promptuser
strAns=MsgBox("Areyousureyouwanttoclosetheactivepagewindow?",_
vbYesNo)
IfstrAns=vbYesThen
Cancel=False
Else
Cancel=True
EndIf
EndSub
![Page 821: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/821.jpg)
OnDeactivateEventOccurswhenauserswitchestoanotherapplicationwindowandtheactiveWebsitewindowlosesthefocus.
PrivateSubexpression_OnDeactivate()
expressionAvariablenamewhichreferencesanobjectoftypeWebWindowExdeclaredusingtheWithEventskeywordinaclassmodule.
![Page 822: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/822.jpg)
Example
Thefollowingexampledisplaysamessagetotheuserwhenthewindowisdeactivated.
PrivateSubobjWebWindow_OnDeactivate()
'Occurswhenthecurrentwebwindowisdeactivated
MsgBox"Thewindowhasbeendeactivated."
EndSub
![Page 823: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/823.jpg)
OnPageCloseEventOccurswhenapageisclosed.
PrivateSubexpression_OnPageClose(ByValpPageAsPageWindowEx,CancelAsBoolean)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageRequiredPageWindowEx.ThespecifiedPageWindowExobject.
CancelRequiredBoolean.CausesMicrosoftFrontPagetoaborttheclosewhensettoTrue.WhenCancelisprogrammaticallysettoTrue,theusercanabortthesaveprocessbyclickingtheCancelbuttonontheform.DefaultisFalse.
![Page 824: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/824.jpg)
Remarks
TheOnPageCloseeventisassociatedwiththeApplicationobject.WhentheuserclosesaPageWindowExobject,theOnPageCloseeventfiresandexecutesthecodewithintheeventprocedure.
![Page 825: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/825.jpg)
Example
ThefollowingexampleusestheIsDirtypropertytocheckifapagehasbeenmodified,andifithassavesthepagebeforeclosingit.
NoteTorunthisexample,youmusthaveatleastoneopenWebsiteandoneopenpagewithinthatWebsite.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdClosePage,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdClosePage_Click()
ActivePageWindow.Close
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnPageClose(ByValpPageAs_
PageWindowEx,CancelAsBoolean)
IfpPage.IsDirty=TrueThenpPage.Save
EndSub
![Page 826: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/826.jpg)
![Page 827: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/827.jpg)
OnPageNewEventOccurswhenanewpageiscreated.
PrivateSubexpression_OnPageNew(ByValpPageAsPageWindowEx)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageRequiredPageWindowEx.APageWindowExobject.
![Page 828: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/828.jpg)
Remarks
Whentheusercreatesanewpagewithinaframeset,theOnPageNeweventisonlyfiredonce—whenthepagecontainingtheframesettagsisopened.ThenMicrosoftFrontPageexecutesthecodewithintheeventprocedure.
NoteTheOnPageNeweventonlyfiresforthedefaultframeset,eveniftherearemoreframesonthepage.ThiseventonlyfiresifFrontPageisinPageview.IfFrontPageisinanyotherview,theOnPageNeweventwon'tfire.
![Page 829: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/829.jpg)
Example
Thefollowingexampleappliesathemetoanewpage.
NoteTorunthisexample,youmusthaveatleastoneopenWebsite.ThisexampleusesRogueCellarsasthespecifiedWebsiteandZinfandel.htmasthespecifiedpage.YoucancreateaWebsiteandpageusingthesenamesoryoucansubstituteaWebsiteandpageofyourchoice.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdAddPage,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdAddPage_Click()
DimmyPageWindowsAsPageWindows
DimmyFileAsString
SetmyPageWindows=ActiveWeb.ActiveWebWindow.PageWindows
myFile=_
"C:/MyDocuments/MyWebSites/RogueCellars/Zinfandel.htm"
myPageWindows.Add(myFile)
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
![Page 830: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/830.jpg)
PrivateSubeFPApplication_OnPageNew(ByValpPageAsPageWindowEx)
pPage.ApplyTheme("artsy")
EndSub
![Page 831: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/831.jpg)
OnPageOpenEventOccurswhenapageisopened.
PrivateSubexpression_OnPageOpen(ByValpPageAsPageWindowEx)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageRequiredPageWindowEx.APageWindowExobject.
![Page 832: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/832.jpg)
Remarks
TheOnPageOpeneventisassociatedwiththeApplicationobject.Whentheuseropensapage,MicrosoftFrontPageopenstheframesetforthepageandfirestheOnPageOpeneventforthedefaultframeset.ThenFrontPageexecutesthecodethatyouspecifiedwithintheeventprocedure.
NoteTheOnPageOpeneventonlyfiresforthedefaultframeset,eveniftherearemoreframesonthepage.TheOnPageOpeneventonlyfiresifthepageisnotopen.
![Page 833: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/833.jpg)
Example
ThefollowingexamplechangesthetitleoftheFPHTMLDocumentobject,whenthedocumentisopenedinaPageWindowExobject.
NoteTorunthisexample,youmusthaveatleastoneopenWebsite.ThisexampleusesRogueCellarsasthespecifiedWebsiteandZinfandel.htmasthespecifiedpage.YoucancreateaWebsiteandpageusingthesenamesoryoucansubstituteaWebsiteandpageofyourchoice.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdAddPage,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdAddPage_Click()
DimmyPageWindowsAsPageWindows
DimmyFileAsString
SetmyPageWindows=ActiveWeb.ActiveWebWindow.PageWindows
myFile=_
"C:/MyDocuments/MyWebSites/RogueCellars/Zinfandel.htm"
myPageWindows.Add(myFile)
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnPageOpen(ByValpPageAs_
![Page 834: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/834.jpg)
PageWindowEx)
DimmyDocAsFPHTMLDocument
SetmyDoc=pPage.ActiveDocument
myDoc.Title="RogueCellarsHomePage"
EndSub
![Page 835: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/835.jpg)
OnPageWindowActivateEventOccurswhenthepageinthecurrentwindowobtainsthefocus.
PrivateSubexpression_OnPageWindowActivate(ByValpPageAsPageWindowEx)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pPageThePageWindowExobjectthatcontainstheview.
![Page 836: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/836.jpg)
Example
Thefollowingexamplepromptstheusertorefreshthepageeachtimethepagewindowobtainsthefocus.
PrivateSubobjApp_OnPageWindowActivate(ByValpPageAsPageWindowEx)
'Occurswhencurrentpageinthemainwindowobtainsfocus.
'Promptstheusertorefreshthecurrentpage.
DimstrAnsAsString
strAns=MsgBox("Doyouwanttorefreshthepage"&pPage.Caption&"?",_
vbYesNo)
IfstrAns=vbYesThen
pPage.Refresh
EndIf
EndSub
![Page 837: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/837.jpg)
OnRecalculateHyperlinksEventOccursbeforethehyperlinkstructureinHyperlinksviewisrecalculatedtoviewanychangesmadetotheWebsite.
PrivateSubexpression_OnRecalculateHyperlinks(ByValpWebAsWebEx,CancelAsBoolean)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebTheWebExobjectthatcontainstheview.
CancelABooleanthatdeterminesiftheeventwillbecancelled.IfFalse,theeventwillnotbecancelled.IfTrue,theeventwillbecancelled.
![Page 838: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/838.jpg)
Example
Thefollowingexamplepromptstheuserbeforerecalculatingthehyperlinkstructure.Iftheuseraccepts,theeventwillcontinueandthehyperlinkswillberecalculated.
PrivateSubobjApp_OnRecalculateHyperlinks(ByValpWebAsWebEx,CancelAsBoolean)
'Occurswhenthecurrentweb'shyperlinksarerecalculated.
DimstrAnsAsString
strAns=MsgBox("Thisactionwillcausethehyperlinksstructuretoberecalculated."_
&"Doyouwanttocontinue?",vbYesNo)
'SetvalueofCancelargumenttousers'response
IfstrAns=vbYesThen
Cancel=False
Else
Cancel=True
EndIf
EndSub
![Page 839: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/839.jpg)
OnWebCloseEventOccurswhenaWebsiteisclosed.
PrivateSubexpression_OnWebClose(ByValpWebAsWebEx,CancelAsBoolean)
expressionAnobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebRequiredWebEx.AWebExobject.
CancelRequiredBoolean.Trueiftheclosingprocesswascancelledthroughtheuserinterface,orifCancelwassettoTrue.DefaultisFalse.
![Page 840: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/840.jpg)
Remarks
TheOnWebCloseeventisassociatedwiththeApplicationobject.WhenyoucloseaWebsite,theOnWebCloseeventfiresandexecutesthecodethatyouspecifiedwithintheeventprocedure.
![Page 841: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/841.jpg)
Example
Thefollowingexampleiteratesthroughtheopenpagesand,ifnecessary,savesthembeforetheWebsiteisclosed.
NoteTorunthisexample,youmusthaveatleastoneopenWebsiteandoneopenpagewithinthatWebsite.ThisexampleusesRogueCellarsasthespecifiedWebsite.YoucancreateaWebsitecalledRogueCellarsorsubstituteaWebsiteofyourchoice.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdCloseWeb,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdCloseWeb_Click()
Webs("C:/MyDocuments/MyWebSites/RogueCellars").Close
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnWebClose(ByValpWebAsWebEx,_
CancelAsBoolean)
DimmyPageWindowsAsPageWindows
DimmyPageWindowAsPageWindowEx
![Page 842: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/842.jpg)
SetmyPageWindows=pWeb.ActiveWebWindow.PageWindows
ForEachmyPageWindowInmyPageWindows
IfmyPageWindow.IsDirty=TrueThenmyPageWindow.Save
Next
EndSub
![Page 843: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/843.jpg)
ShowAll
![Page 844: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/844.jpg)
OnWebFileCheckOutEventOccurswhenafileinthecurrentWebsiteischeckedout.
PrivateSubexpression_OnWebFileCheckOut(ByValpWebAsWeb,ByValpFileAsWebFile,CheckedOutAsBoolean,pCheckOutOptionAsFpCheckOutOption)
expressionThevariablenamethatreferencesanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebThecurrentWebExobjectthatcontainsthefile.
pFileTheWebFilebeingcheckedout.
CheckedOutABooleanthatindicatesthestatusofthefile.IfTrue,thefileischeckedout.IfFalse,thefilehasnotbeencheckedout.
pCheckOutoptionFpCheckOutOption.Specifiesthecheckoutfileoption.
FpCheckOutOptioncanbeoneoftheseFpCheckOutOptionconstants.FPCheckOutDefault.Checkthefileout.FPCheckOutCancelCancelthefilecheckout.FPCheckOutReadOnlyChecksoutaread-onlyversionofthefile.FPCheckOutPromptUserPromptstheuserbeforecheckingoutthefile.
![Page 845: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/845.jpg)
Example
Thefollowingexamplepromptstheuserbeforethefileischeckedout.
PrivateSubobjApp_OnWebFileCheckOut(ByValpWebAsWeb,ByValpFileAsWebFile,
_CheckedOutAsBoolean,_
pCheckOutOptionAsFpCheckOutOption)
'Occurswhenafileinthecurrentwebischeckedout.
'Prompttheuserbeforecheckingoutthefile
pCheckOutOption=fpCheckOutPromptUser
EndSub
![Page 846: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/846.jpg)
OnWebNewEventOccurswhenanewWebsiteiscreated.
PrivateSubexpression_OnWebNew(ByValpWebAsWeb)
expressionThevariablenamethatreferencesanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebRequiredWebEx.AWebExobject.
![Page 847: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/847.jpg)
Remarks
TheOnWebNeweventisassociatedwiththeApplicationobject.WhentheusercreatesanewWebsiteinMicrosoftFrontPage,theOnWebNeweventfiresandexecutesthecodewithintheeventprocedure.
![Page 848: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/848.jpg)
Example
ThefollowingexamplecreatesatemporaryWebsiteandaddsanewfile.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdCreateWeb,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdCreateWeb_Click()
Webs.Add("C:/MyDocuments/MyWebSites/TempWeb")
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnWebNew(ByValpWebAsWeb)
DimmyFileAsWebFile
SetmyFile=pWeb.RootFolder.Files.Add("index.htm")
myFile.Open
EndSub
![Page 849: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/849.jpg)
![Page 850: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/850.jpg)
OnWebOpenEventOccurswhenaWebsiteisopened.
PrivateSubexpression_OnWebOpen(ByValpWebAsWeb)
expressionThevariablenamethatreferencesanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebRequiredWebEx.AWebExobject.
![Page 851: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/851.jpg)
Remarks
TheOnWebOpeneventisassociatedwiththeApplicationobject.WhentheuseropensaWebsiteinMicrosoftFrontPage,theOnWebOpeneventfiresandexecutesthecodethatyouspecifiedwithintheeventprocedure.
![Page 852: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/852.jpg)
Example
ThefollowingexampleopenstheIndex.htmfilewhenaWebsiteisopened.
NoteThisexampleusesRogueCellarsasthespecifiedWebsitetobeopened.YoucancreateaWebsitecalledRogueCellarsoryoucansubstituteaWebsiteofyourchoice.
CreateaformcalledfrmLaunchEvents.frmandaddtwobuttons,abuttoncalledcmdOpenWeb,andabuttoncalledcmdCancel.Addthefollowingcodetotheformcodewindow.
OptionExplicit
PrivateWithEventseFPApplicationAsApplication
PrivatepPageAsPageWindowEx
PrivateSubUserForm_Initialize()
SeteFPApplication=NewApplication
EndSub
PrivateSubcmdOpenWeb_Click()
Webs.Open("C:/MyDocuments/MyWebSites/RogueCellars")
EndSub
PrivateSubcmdCancel_Click()
'Hidetheform.
frmLaunchEvents.Hide
ExitSub
EndSub
PrivateSubeFPApplication_OnWebOpen(ByValpWebAsWeb)
DimmyFileAsWebFile
SetmyFile=pWeb.RootFolder.Files.Add("index.htm")
myFile.Open
EndSub
![Page 853: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/853.jpg)
WindowActivateEventOccurswhenawindowisactivated.
PrivateSubexpression_WindowActivate(ByValpWebWindowAsWebWindowEx)
expressionThevariablenameofanobjectoftypeApplicationdeclaredusingtheWithEventskeywordinaclassmodule.
pWebWindowTheWebWindowExobject.
![Page 854: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/854.jpg)
Remarks
WhenaninstanceofMicrosoftFrontPageobtainsthefocus,aWindowActivateeventwillfireforeachopenwindow.
![Page 855: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/855.jpg)
Example
ThefollowingexamplepromptstheusertoclosethewindowwhentheFrontPagewindowobtainsthefocus.
PrivateSubexpression_WindowActivate(ByValpWebWindowAsWebWindowEx)
'OccurswhenaFrontPagewindowobtainsfocus.
DimstrAnsAsString
strAns=MsgBox("Areyousureyouwanttoopenthewindow"_
&pWebWindow.Caption&"?",_
vbYesNo)
IfstrAns=vbNoThen
pWebWindow.Close
EndIf
EndSub
![Page 856: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/856.jpg)
WindowDeactivateEventOccurswhenaWebwindowisdeactivated.
PrivateSubexpression_WindowDeactivate(ByValpWebWindowAsWebWindowEx)
expressionThevariablenameofanobjectoftypeApplicationdeclaredwitheventsinaclassmodule.
pWebWindowTheWebWindowExobject.
![Page 857: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/857.jpg)
Example
Thefollowingexamplepromptstheusertoclosethewindowwhenthewindowlosesthefocus.
PrivateSubexpression_WindowDeactivate(ByValpWebWindowAsWebWindowEx)
'OccurswhenaMicrosoftFrontPagewindowlosesfocus.
DimstrAnsAsString
strAns=MsgBox("Doyouwanttoclosethiswindow?"_
&pWebWindow.Caption&"?",_
vbYesNo)
IfstrAns=vbYesThen
pWebWindow.Close
EndIf
EndSub
![Page 858: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/858.jpg)
ShowAll
![Page 859: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/859.jpg)
FrontPageWebObjectModelEnumeratedConstantsThistopicprovidesalistofallenumeratedconstantsintheMicrosoftFrontPageWebObjectModel.
FpCheckOutOption
Constant ValuefpCheckOut 1fpCheckOutCancel 3fpCheckOutPromptUser 0fpCheckOutReadOnly 2
FpChoiceFieldFormat
Constant ValuefpChoiceFieldCheckBoxes 2fpChoiceFieldDropdown 0fpChoiceFieldRadioButtons 1
FpConnectionSpeed
Constant ValuefpConnect1000K 9fpConnect128K 3fpConnect144 0fpConnect1500K 4fpConnect256K 6fpConnect288 1fpConnect384K 7fpConnect512K 8
![Page 860: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/860.jpg)
fpConnect56K 2fpConnectISDN 3fpConnectT1 4fpConnectT3 5
FpCurrencyFieldFormat
Constant ValuefpCurrencyFieldAlgerian 5121fpCurrencyFieldArgentina 11274fpCurrencyFieldAustralia 3081fpCurrencyFieldAustria 3079fpCurrencyFieldBahraini 15361fpCurrencyFieldBelgiumBF 2067fpCurrencyFieldBelgiumFB 2060fpCurrencyFieldBolivia 16394fpCurrencyFieldBrazil 1046fpCurrencyFieldCanada 4105fpCurrencyFieldCanadaF 3084fpCurrencyFieldChile 13322fpCurrencyFieldColombia 9226fpCurrencyFieldCostaRica 5130fpCurrencyFieldCzech 1029fpCurrencyFieldDenmark 1030fpCurrencyFieldDominicanRepublic 7178fpCurrencyFieldEcuador 12298fpCurrencyFieldEgyptian 3073fpCurrencyFieldElSalvador 17418fpCurrencyFieldEuro -1fpCurrencyFieldEuroPostfix -2fpCurrencyFieldFinland 1035fpCurrencyFieldFrance 1036fpCurrencyFieldGermany 1031
![Page 861: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/861.jpg)
fpCurrencyFieldGreece 1032fpCurrencyFieldGuatemala 4106fpCurrencyFieldHonduras 18442fpCurrencyFieldHongKong 3076fpCurrencyFieldHungary 1038fpCurrencyFieldIndian 1081fpCurrencyFieldIranian 1065fpCurrencyFieldIraqi 2049fpCurrencyFieldIreland 6153fpCurrencyFieldIsraeli 1037fpCurrencyFieldItaly 1040fpCurrencyFieldJapan 1041fpCurrencyFieldJordanian 11265fpCurrencyFieldKorea 1042fpCurrencyFieldKuwaiti 13313fpCurrencyFieldLebanese 12289fpCurrencyFieldLibyan 4097fpCurrencyFieldMexico 2058fpCurrencyFieldMoroccan 6145fpCurrencyFieldNetherlands 1043fpCurrencyFieldNewZealand 5129fpCurrencyFieldNicaragua 19466fpCurrencyFieldNorway 1044fpCurrencyFieldOmani 8193fpCurrencyFieldPakistani 1056fpCurrencyFieldPanama 6154fpCurrencyFieldParaguay 15370fpCurrencyFieldPeru 10250fpCurrencyFieldPoland 1045fpCurrencyFieldPortugal 2070fpCurrencyFieldPRChina 2052fpCurrencyFieldQatari 16385fpCurrencyFieldRussia 1049
![Page 862: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/862.jpg)
fpCurrencyFieldSaudiArabian 1025fpCurrencyFieldSingapore 4100fpCurrencyFieldSlovakia 1051fpCurrencyFieldSlovenia 1060fpCurrencyFieldSouthAfrica 7177fpCurrencyFieldSpain 1034fpCurrencyFieldSweden 1053fpCurrencyFieldSwitzerland 2055fpCurrencyFieldSyrian 10241fpCurrencyFieldTaiwan 1028fpCurrencyFieldThai 1054fpCurrencyFieldTunisian 7169fpCurrencyFieldTurkey 1055fpCurrencyFieldUAE 14337fpCurrencyFieldUnitedKingdom 2057fpCurrencyFieldUnitedStates 1033fpCurrencyFieldUruguay 14346fpCurrencyFieldVenezuela 8202fpCurrencyFieldVietnamese 1066fpCurrencyFieldYemeni 9217
FpDateTimeFieldFormat
Constant ValuefpDateTimeFieldDateAndTime 0fpDateTimeFieldDateOnly 1
FpDependencyFlags
Constant ValuefpDepsDefault 255fpDepsImages 2fpDepsLinkbars 16fpDepsLinks 1
![Page 863: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/863.jpg)
fpDepsLists 4fpDepsNavbars 32fpDepsNone 0fpDepsRecurse 256fpDepsSharedBorders 128fpDepsThemes 8fpDepsWebParts 64
FpFieldType
Constant ValuefpFieldAttachments 13fpFieldChoice 5fpFieldComputed 11fpFieldCounter 9fpFieldCurrency 3fpFieldDateTime 4fpFieldFile 12fpFieldInteger 10fpFieldLookup 6fpFieldMultiLine 1fpFieldNumber 2fpFieldRatingScale 14fpFieldSingleLine 0fpFieldTrueFalse 7fpFieldURL 8
FpFolderType
Constant ValuefpFolderDHTMLSharedLib 1
FpListDesignSecurity
![Page 864: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/864.jpg)
Constant ValuefpListDesignSecurityCreator 1fpListDesignSecurityEveryone 0
FpListEditSecurity
Constant ValuefpListEditSecurityAll 0fpListEditSecurityNone 2fpListEditSecurityOnlyOwn 1
FpListReadSecurity
Constant ValuefpListReadSecurityAll 0fpListReadSecurityOnlyOwn 1
FpListType
Constant ValuefpListTypeBasicList 0fpListTypeDiscussion 3fpListTypeDocumentLibrary 2fpListTypeSurvey 1
FpNumberFieldFormat
Constant ValuefpNumberFieldAuto -1fpNumberFieldFiveDecimals 5fpNumberFieldFourDecimals 4fpNumberFieldInteger 0fpNumberFieldOneDecimal 1fpNumberFieldThreeDecimals 3
![Page 865: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/865.jpg)
fpNumberFieldTwoDecimals 2
FpOptimizeHTMLFlags
Constant ValuefpHtmlOptAdjacentTags 64fpHtmlOptAuthorComponents 8fpHtmlOptBots 8fpHtmlOptBrowseComponents 131072fpHtmlOptCellFormattingAttr 256fpHtmlOptDreamWeaver 2fpHtmlOptDwtCmnts 1024fpHtmlOptEmpty 32fpHtmlOptGenerator 16fpHtmlOptHTMLAllWhitespace 16384fpHtmlOptHTMLCmnts 4096fpHtmlOptHTMLLeadWhitespace 8192fpHtmlOptHTMLMisnest 32768fpHtmlOptOn -2147483648fpHtmlOptScriptCmnts 2048fpHtmlOptThemes 4fpHtmlOptTrcImageAttr 512fpHtmlOptUnusedStyles 65536fpHtmlOptVMLGraphics 128fpHtmlOptWordHTML 1
FpPageViewMode
Constant ValuefpPageViewDefault 0fpPageViewHtml 2fpPageViewInBetween 512fpPageViewInvalid -1fpPageViewNoFrames 4
![Page 866: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/866.jpg)
fpPageViewNormal 1fpPageViewNoWindow 128fpPageViewPreview 8fpPageViewPrintPreview 256fpPageViewSplit 16fpPageViewText 32fpPageViewXml 64
FpPkgImportConflictOpts
Constant ValuefpPkgFileConflictMask 15fpPkgListConflictMask 240fpPkgOnConflictSkip 17fpPkgOnConflictStop 0fpPkgOnFileConflictOverwrite 2fpPkgOnFileConflictSkip 1fpPkgOnFileConflictStop 0fpPkgOnListConflictMergeOrRename 64fpPkgOnListConflictMergeOrSkip 48fpPkgOnListConflictMergeOrStop 32fpPkgOnListConflictRename 80fpPkgOnListConflictSkip 16fpPkgOnListConflictStop 0
FpPkgImportResult
Constant ValuefpPkgImportCancelled 2fpPkgImportComplete 0fpPkgImportErrorInPackage 3fpPkgImportFailed 1fpPkgImportNotTrusted 5fpPkgImportServerNotSupported 6
![Page 867: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/867.jpg)
fpPkgImportStopped 4
FpPkgTrustLevel
Constant ValuefpPkgTrustAll 1fpPkgTrustCertificateStore 2
FpSharedBorders
Constant Value_fpBorderNone 0fpBorderAll 255fpBorderBottom 8fpBorderLeft 2fpBorderRight 4fpBorderTop 1
FpStructModType
Constant ValuefpStructBaseOnSibling 0fpStructLeftmostChild 1fpStructRightmostChild 2
FpThemeProperties
Constant ValuefpThemeActiveGraphics 16fpThemeBackgroundImage 1fpThemeCSS 4096fpThemeDefaultSettings 16777216fpThemeName 33554432fpThemeNoBackgroundImage 0
![Page 868: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/868.jpg)
fpThemeNoCSS 0fpThemeNormalColors 0fpThemeNormalGraphics 0fpThemePropertiesAll 4369fpThemePropertiesNone 0fpThemeVividColors 256
FpURLComponent
Constant ValuefpURLComponentBookmark 256fpURLComponentFileExtension 128fpURLComponentFileName 64fpURLComponentPassword 4fpURLComponentPath 32fpURLComponentPort 16fpURLComponentQuery 512fpURLComponentScheme 1fpURLComponentServer 8fpURLComponentUserName 2
FpURLFieldFormat
Constant ValuefpURLFieldImage 1fpURLFieldLink 0
FpWebDeleteFlags
Constant ValuefpDeleteEntireWeb 0fpDeleteFrontPageInfoFromWeb 1
FpWebOpenFlags
![Page 869: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/869.jpg)
Constant ValuefpOpenInWindow 0fpOpenNoWindow 2
FpWebPublishFlags
Constant ValuefpPublishAddToExistingWeb 2fpPublishCopyAllFiles 64fpPublishCopySubwebs 4fpPublishIncremental 1fpPublishLogInTempDir 8fpPublishNoDeleteUnmatched 16fpPublishNone 0fpPublishRemoteToLocal 128fpPublishSynchronize 256fpPublishUseLastPublishTime 32fpPublishUsingDav 512fpPublishUsingPassiveFtp 1024
FpWebSubView
Constant ValuefpWebSubViewFolders 1fpWebSubViewNavigation 2fpWebSubViewNone 0
FpWebViewMode
Constant ValuefpWebViewAllFiles 4fpWebViewBrokenLinks 6fpWebViewFolders 1fpWebViewLinks 0
![Page 870: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/870.jpg)
fpWebViewPage 3fpWebViewRemoteSite 8fpWebViewSiteSummary 7fpWebViewStructure 2fpWebViewTodo 5
FpWebViewModeEx
Constant ValuefpWebViewExAccessibility 37fpWebViewExAllFiles 4fpWebViewExAssignedTo 13fpWebViewExBrokenLinks 6fpWebViewExBrowserTypes 29fpWebViewExCategories 17fpWebViewExCheckoutStatus 16fpWebViewExComponentErrors 18fpWebViewExCSSLinks 33fpWebViewExDailyPageHits 19fpWebViewExDailySummary 22fpWebViewExFolders 1fpWebViewExLinks 0fpWebViewExMasterPages 32fpWebViewExMonthlyPageHits 21fpWebViewExMonthlySummary 24fpWebViewExNavigation 2fpWebViewExOlderFiles 8fpWebViewExOsTypes 28fpWebViewExPage 3fpWebViewExPublishStatus 15fpWebViewExRecentlyAddedFiles 9fpWebViewExRecentlyChangedFiles 10fpWebViewExReferringDomains 25
![Page 871: documentation.help · BasicList ListFields Web Lists NavigationNode WebFile NavigationNodes Properties Themes Theme WebFiles WebFile WebFolders WebWindows WebWindow WebFolder List](https://reader030.fdocuments.us/reader030/viewer/2022040403/5e8c3cc4226b217f37327874/html5/thumbnails/871.jpg)
fpWebViewExReferringURLs 26fpWebViewExRemoteSite 34fpWebViewExReviewStatus 14fpWebViewExSearchStrings 27fpWebViewExSharedBorders 36fpWebViewExSiteSummary 7fpWebViewExSlowPages 11fpWebViewExThemes 35fpWebViewExTodo 5fpWebViewExUnlinkedFiles 12fpWebViewExUsageSummary 31fpWebViewExVisitingUsers 30fpWebViewExWeeklyPageHits 20fpWebViewExWeeklySummary 23