|
Dear Suresh,
let me suggest U a simplest and finest way,
open a word file, record a macro and do the events u wants,
and stop the macro and Press Alt+F11
copy the code in VB Project and open that project using .Net it will gives you a code..
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
i worked with macros also it's not working
can please help me. if u have code for creating word document.
Dim w As New Word.Application
Dim d As Word.Document
d = w.Documents.Open("c:\test1.doc")
'w.Selection.MoveRight(Unit:=1, count:=6)
d.MailMerge.OpenDataSource(Name:="C:\test1.csv", ReadOnly:=False, LinkToSource:=True, Connection:="", SQLStatement:="", SQLStatement1:="")
d.Fields.Add(Range:=w.Selection.Range, Type:=Word.WdFieldType.wdFieldMergeField, Text:="""LastName""")
With d.MailMerge
.Destination = Word.WdMailMergeDestination.wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = Word.WdMailMergeDefaultRecord.wdDefaultFirstRecord
.LastRecord = Word.WdMailMergeDefaultRecord.wdDefaultLastRecord
End With
.Execute(Pause:=False)
End With
w.Visible = True
|
|
|
|
|
hello guys
I have the following code:
Dim lineArray As String() = ProcessBuffer.ToString.Split(ControlChars.Cr)
Dim lineArrayList As ArrayList = ArrayList.Adapter(lineArray)
I use the Adapter method to convert my array to an arraylist, what is far more easy to work in my program.
Now when i want to remove a index I get this exception.
Unhandled Exception: System.NotSupportedException: Collection was of a fixed size.
at System.Array.System.Collections.IList.RemoveAt(Int32 index)
at System.Collections.IListWrapper.RemoveAt(Int32 index)
Anyone an idea how to avoid this problem without using a manual copy of all the elements into the arraylist. Because it seems that the arraylist gets a fixed size. :-/
|
|
|
|
|
try using the ArrayList(ICollection) constructor, that one copies the items for you.
|
|
|
|
|
Thanks for the answer.
I was checking ArrayList(ICollection) and I can't figure it out how it works, what i do, the same problem appears. Can you help me by putting me in the right direction?
Thanks.
|
|
|
|
|
Hi,
this is C# code that works; it prints 5 and 6
ArrayList list;
int[] arr=new int[]{1,2,3,4,5};
list=new ArrayList(arr);
log("count="+list.Count);
list.Add(6);
log("count="+list.Count);
If I am not mistaken, the crucial line translates to VB.NET as:
list=New ArrayList(arr)
|
|
|
|
|
Thanks that does the job. Now I can delete what I want without having problems.
|
|
|
|
|
Guys & Gals
i Was playing around with the screens .
Was wondering if i can use logo and have it revolving around the programs main form. How can i archive this?
|
|
|
|
|
Your question doesn't make a whole lot of sense. You can draw anything you like on your forms. Where do you want to draw it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
think he want it to orbit around his form, passing in front and behind, maybe direct him to the graphics forum.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
OK - he wants WPF then.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
try the graphics forum.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
|
|
|
|
|
I m using Visual Studio 2005. How can I drag and Drop Table From Data Connection Node of Server Explorer to Form. I have done it n Visual Studio 2003. But I m not able to do this in 2005. Does VS 2005 does not support it, or ther s a special method for that.
Thanks in Advance.
|
|
|
|
|
It works exactly the same. So long as you can see the table in the Server Explorer and can hold the mouse button down on it and drag it over to the form. Are you getting a circle with a line through it when you try to drag the table over to the form?
|
|
|
|
|
Yes I get a circle with a line through it when I try to drag the table over to the form.
|
|
|
|
|
There are only two ways I've seen this happen. The first is when you try to drag the table to the code view of the form. It will only work if you drop it on the design view of the form. And the second is if the form's controls are locked. Click on the form to select it in design view, right-click on it and you should see an option for "Lock Controls". This should not have a check mark next to it.
|
|
|
|
|
Wait a minute. It just occured to me, you're dragging this table from Server Explorer? That won't work. You have to create a Data Connection to the database, open up the database on the Data Sources tab, then drag to table from there.
|
|
|
|
|
Hello There
I have one requirement where I have to transfer the file from one machine to another. Client is ready to accept the application installed on both ends. I dont understand which technology is the best one to transfer the file. (File size could be 1 mb to 1 GB) like one is remoting .. Please suggest me any thing or send me some link for code help if any ?
Thanks
|
|
|
|
|
This can be done any number of ways. Do you need security? Can you use an existing file transfer method, like FTP?
You can use Remoting. You can write your own socket-based client/server over TCP/IP, a web service would work. There's a bunch of different methods. For examples, all you have to do is Google for something like "VB.NET ftp send file".
|
|
|
|
|
1. VB 6.0
2. VB.net
3. VB.net 2005
I'm hoping for the information ....
|
|
|
|
|
Could you perhaps be a little more specific as to the nature of the information you require?
|
|
|
|
|
gazga wrote: I'm hoping for the information
What information? You haven't asked for any information. You just said "Information that I need" and listed 3 version of VB.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Colin Angus Mackay wrote: What information? You haven't asked for any information.
He probably thinks we are supposed to be mind readers
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
|