|
First, why are you still using VB6?? Do you know that there will be no VB6 runtime support in Windows 8?
Next, why are you using a web browser control? You just need to use Office Interop to do these things. No, I don't have any examples because VB6 has been dead for years and I haven't touched in since 2001.
|
|
|
|
|
we can edit word doc by VB6 Office Interop but I am not able to find control in VB6 to view and edit word doc except webBrowser control.Please help me to find solution.
|
|
|
|
|
Can this help
Sub test()
Dim word As Object, Doc as object
Set word = CreateObject("Word.application")
word.Visible = True
Set doc = word.documents.Add
End Sub
it's simple basic code and works almost always
however Dave is correct vb6 is dead! use .net
Jan
|
|
|
|
|
Thanks for your reply.But in my case it is prerequisite to show word file in a control like webBrowser. we have maintenance project and currently using WebBrowser control in VB6 and it is working fine in WinXP environment.Our VB6 code is doing window registry changes for BrowserFlags and EditFlags.I can not migrate to VB.NET now.
But on win7, we have no rights to do registry changes.So I am looking for VB6 code solution to open word file inside WebBrowser control of VB6.We are also editing word file via VB6 code.
|
|
|
|
|
SIR,
I'm Sireesha. i want a report birthday of members by month wise , year wise .
Dim con As New ADODB.Connection
Dim rs1 As New ADODB.Recordset
Dim rs As New ADODB.Recordset
Dim MonthSql
Dim mon1 As String
Dim month1 As String
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\FBMDetails.mdb;Persist Security Info=False"
MonthSql = "select dob,md from fdetails"
mon1 = InputBox("enter month", "month")
Set rs = con.Execute(MonthSql)
rs.MoveFirst
While Not rs.EOF
month1 = Month(rs.Fields("dob"))
drMwr.Sections(1).Controls(5).Caption = mon
If month1 = mon1 Then
Dim monthsql1
monthsql1 = "select name,dob,md,phone,email from fdetails where month1 = ' " + mon1 + "' "
MsgBox (monthsql1)
rs1.Open monthsql1, con
Set rs1 = con.Execute(monthsql1)
Set drMwr.DataSource = rs1
drMwr.Show
End If
rs.MoveNext
Wend
i got an error:u> no value given for one or more required parameters in the statement rs1.Open monthsql1, con what to do sir how to solve this
Sireesha
|
|
|
|
|
|
Quote: monthsql1 = "select name,dob,md,phone,email from fdetails where month1 = ' " + mon1 + "' "
change your query(remove the spaces
monthsql1 = "select name,dob,md,phone,email from fdetails where month1='" + mon1 + "'"
|
|
|
|
|
spuritha wrote: no value given for one or more required parameters
Check your column names. You might have misspelled them.
|
|
|
|
|
The required parameters message normally means that one of the fields names in the SQL is spelt incorrectly.
Alternatively it could be a reserved word so you can try putting square brackets around the field name ie
select [name],dob,md,phone,email from fdetails
Name is a reserved field
|
|
|
|
|
How to disable program to run more than once?
It's funny when my login form appears twice when i accidentally enter the .exe twice..
thanks before,
|
|
|
|
|
Use a registry key or create a file which you can check when the program starts.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
using vb to create registry? possible?
why is my thread color became grey?
modified 28-Dec-11 4:13am.
|
|
|
|
|
vkstarry wrote: using vb to create registry? possible?
Certainly, see the Registry [^] class.
vkstarry wrote: why is my thread color became grey?
Because some moron has voted your question down because - well who knows what motivates these unicellular pieces of pond sludge.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
If you are using VB.NET, there is a checbox called "make single instance application" in application properties; checking it will do the trick for you.
|
|
|
|
|
|
All right i got it, thankyou to all of you..
|
|
|
|
|
Hello everybody,
hope you had a nice Christmas and happy holidays! Nevertheless, now I need your advice again
I used the designer to bind a SQL database to a DataGridView, and, actually, it works. But now I want to show the progress of retrieving the data rows in a progressbar - and don't find any event to trap for the 'UpdateProgress' procedure. The underlying datatable of the BindingSource turns out to be a "System.Data.Linq.Table(of T)" which doesn't seem to have a RowChanged event like a normal DataTable.
Can someone please help me to find my way out of this maze? (no philospohical background here )
Thanks,
Mick
|
|
|
|
|
Came across an interesting article today, and remembered a question here on CP looking for it.
Enjoy[^]
Bastard Programmer from Hell
|
|
|
|
|
good one.
|
|
|
|
|
|
Thank you Eddy for remembering!
I'll go over it tomorrow, for now I just wanted to wish you a Happy New Year!!!
|
|
|
|
|
Thanks, and best wishes for the coming year
Bastard Programmer from Hell
|
|
|
|
|
Hello,everyone!
I want to find a winform by its name in my project. At first, I thougt it could return the specific form with codes like below:
for each iForm as Form in XXX
return iForm
next
Is this right or not? If right, what's the collection included forms of project? If wrong, what should I do?
Would you give me some suggestions or demo?
Thanks!
|
|
|
|
|
if it is a visible form belonging to your own process, iterate the Application.OpenForms collection.
Otherwise, you will need to enumerate all the Windows windows using the EnumWindows[^] function (in user32.dll) using P/Invoke.
|
|
|
|
|
Thanks in advance,
I want to Update child nodes of a node, like in my XML document i have a node "Name", i want that it will search for its child Node "First_Name" having inner text "FN2" and then will update its Parents other child nodes like "Middle_Name" and "Last_Name".
I had asked this Question Here
www.codeproject.com/Questions/305565/how-to-Update-more-then-one-child-nodes-in-vb-net[^]
and got answer to obtain this Using LINQ , is there any other way to do this
Xml File
="1.0"
<Names>
<Name>
<First_Name>FN 1</First_Name>
<Middle_Name>MN 1</Middle_Name>
<Last_Name>LN 1</Last_Name>
<Country_Code>001</Country_Code>
<Area_Code>
</Area_Code>
<Phone_No>
</Phone_No>
<Email_Address>mail@email.com</Email_Address>
<Address>Address 1</Address>
</Name>
<Name ID="2">
<First_Name>FN2</First_Name>
<Middle_Name>Mn2</Middle_Name>
<Last_Name>Ln2</Last_Name>
<Country_Code>02</Country_Code>
<Area_Code>002</Area_Code>
<Phone_No>0002</Phone_No>
<Email_Address>email@mail2.com</Email_Address>
<Address>
</Address>
</Name>
</Names>
Code:
Function Edit() As Boolean
Try
'Dim xd As New XmlDocument()
'xd.Load(App_Path)
'Dim nod As XmlNodeList = xd.SelectNodes("//First_Name[. = '" & txtFName.Text & "']" & "/parent::node()/First_Name")
'If nod IsNot Nothing Then
' For Each node In nod
' 'nod.Item(0).ChildNodes(0).InnerText = txtMName.Text.Trim
' 'nod.Item(0).ChildNodes(1).InnerText = txtLName.Text.Trim
' Next
'End If
Dim xd As New XmlDocument()
xd.Load(App_Path)
Dim nod As XmlNode = xd.SelectSingleNode("//First_Name[. = '" & txtFName.Text & "']" & "/parent::node()/First_Name")
If nod IsNot Nothing Then
nod.ChildNodes(0).InnerText = "33"
nod.ChildNodes(1).InnerText = "333"
End If
Edit = True
Catch ex As Exception
MessageBox.Show(ex.Message)
ctlStatus.Text = "Current State : " & ex.Message.ToString
Return False
End Try
Return Edit
End Function
SOFTDEV
Luck in life always exists in the form of an abstract class that cannot be instantiated directly and needs to be inherited by hard work and dedication.
|
|
|
|