Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

navigate2 flag parameters

Status
Not open for further replies.

anto2

Programmer
Apr 4, 2001
29
0
0
IE
Hello,

This is probably very easy.

I am using the navigate2 method in my prog. eg. mynav.navigate2 (url)

the method navigate2 is define like so

object.Navigate2 URL [Flags,] [TargetFrameName,] [PostData,] [Headers]

I would like to be able to pass some values the the flags parameter. How do you do this? The flags I want to set are
navnohistory,navnoreadfromcache. How do I construct the method call.

I have tried .navigate2.(url,navNohistory) but this does not work

Anthony.
 
Try

Private Const navOpenInNewWindow As Long = 1
Private Const navNoHistory As Long = 2
Private Const navNoReadFromCache As Long = 4
Private Const navNoWriteToCache As Long = 8
Private Const navAllowAutosearch As Long = 16
Private Const navBrowserBar As Long = 32
Private Const navHyperlink As Long = 64

Dim navflags as Long
navflags = navNoHistory + navNoWriteToCache
.navigate2.(url,navFlags) Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Helo John,

I have found that I have to call the method with no brackets around the parameters e.g. .navigage url,flags not .navigate(url,flags)

Anthony
 
I completely missed the period after navigate2 and forgot about the () around the parameters. I was thinking that you needed documentation on the flags. When you said it did not work, I assumed that you meant a run-time error not a compile-time error. Forms/Controls Resizing/Tabbing Control
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Hello again Samphdauto,

This is a procedure I ended up with that posts a form to an URL.

Public Sub validate_logon()

Dim URL As String
Dim Flags As Long
Dim TargetFrame As String
Dim PostData() As Byte
Dim Headers As String

URL = " Flags = 2
TargetFrame = ""
PostData = "p_badge=" + frmMain.txtCurrentBadge + "&p_pin=" + frmPIN.txtPin

' VB creates a Unicode string by default so we need to
' convert it back to Single byte character set.

PostData = StrConv(PostData, vbFromUnicode)
Headers = "Content-Type: application/x- & vbCrLf


frmBrowser.WebBrowser.Navigate2 URL, Flags, TargetFrame, PostData, Headers
frmBrowser.Visible = True
frmBrowser.WebBrowser.Visible = True

End Sub
 
Hi Anthony.. here is what I need to do



I have a form with a cmdExtract which after fires it needs to:
By using Inet. How can I copy a news article text from an URL into a Word.doc file?
Also copy the article headline into a table in Access and copy it’s now new location on the hard drive in a Access.mdb table? The Access table has Headline and Location as fields.

I have this in a bas module

Public Type InetLinkInfo
InetLinkText As New Collection
InetLinkHref As New Collection
End Type

Public Function GetInetLinkInfo(InetLink As Inet) As InetLinkInfo
Dim L
For Each L In InetLink.Document.Links
GetInetLinkInfo.InetLinkText.Add L.Innertext
GetInetLinkInfo.InetLinkHref.Add L.Href
Next
End Function


Private Sub cmdExtract_Click()
Dim MyInfo As InetLinkInfo
Dim c As Long

c = 1
MyInfo = GetInetLinkInfo(Inet1.OpenURL(searchURL.Text))
Do Until c = MyInfo.InetLinkText.Count + 1
MsgBox MyInfo.InetLinkText.Item(c) & " " & MyInfo.InetLinkHref.Item(c)
c = c + 1
Loop

End Sub

if I run this, I get Run time error '424': Object required and the yellow highlight on the line in the last section of the code at
MyInfo = GetInetLinkInfo(Inet1.OpenURL(searchURL.Text))

after that I need help please.. in creating a .doc file and coping the innertext of the article and inserting the info into Access .mdb



any help would be great
Thanks a lot

Sam

 
Hello Samphdauto,

Sorry, I don't have clue how you would do this.

Anthony.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top