|
What do you mean by "to Printer"?
Are you trying to do this in code or in Word?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have Templates setup in Word. My program updates the SQL database and then it should print the templates. There is a Mail Merge in word document to the Database. Now If i want to print only 5 records instead of printing all records, It should perform Merge to Printer (same as in word). I want to create a program with From, To, Current, All which will allow me print records in the templates.
In the word there are features as "Merge to New Document", "Merge to Printer", "Merge to Email"
Thanks for replying.
|
|
|
|
|
You might want to look at How To Automate Microsoft Word to Perform a Mail Merge from Visual Basic .NET[^] on MSDN. Get the MailMerge to work how you want first, then worry about hiding Word.
When you get down to the bottom of the code, change the line
wrdMailMerge.Destination = Word.WdMailMergeDestination.wdSendToNewDocument
to read
wrdMailMerge.Destination = Word.WdMailMergeDestination.wdSendToPrinter
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
i want to Synchronize my local database with remote database but i have to face problem in login
i m writing my connection string here, it opens the database but when i want to retrieve database, it gives me error login failed computername/guest
while my login name is not guest.....i have no account with the name guest.
/*************************************************************************/
Private Sub btnButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnButton2.Click
'Dim flag As Boolean = Me.ChkValidIP(Me.txtTextBox2.Text)
'If flag = True Then
Dim CS As String = "Network Library=DBMSSOCN;" & _
"Data Source=10.0.0.15,1433;" & _
"Initial Catalog=REIMSCDB;" & _
"User ID=sa;" & _
"Password= ;" & _
"Trusted_Connection=yes;"
Dim con As SqlConnection = New SqlConnection(CS)
Try
If con.State.Open Then
Dim sqlDA As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM LoginAccount", con)
Dim ds As DataSet = New DataSet
sqlDA.Fill(ds)
If Not ds Is Nothing Then
Dim dr As DataRow = ds.Tables(0).Rows(0)
MessageBox.Show(Convert.ToString(dr("LoginID")))
End If
MessageBox.Show("Done")
con.Close()
Else
MessageBox.Show("false")
End If
Catch oexp As System.Data.SqlClient.SqlException
MessageBox.Show(oexp.Message)
Finally
con.Close()
End Try
'End If
/*************************************************************************/
please try this code and send me solution if you know about this.
RAK
|
|
|
|
|
Try switching the Trusted_Connection=yes to Trusted_Connection=no . And please, please use a login id other than sa.
my blog
|
|
|
|
|
i tried all posibilities of login but it don't work send me another solution of it
|
|
|
|
|
i need a combo box just like use in
OutLook express--->
Contacts--->
New Contact ---->
Email : Combo box Diaplay
Please open the outlook express and see the new contacts if you know help me
RAK
|
|
|
|
|
I think it's a menu, not a combobox
|
|
|
|
|
That's a menu, not a ComboBox...
All it is is a menuitem with a little down arrow icon next to it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I create an XML document as a result of Visual Basic code compilation?
|
|
|
|
|
What do you mean? The VB.NET Compiler doesn't output any XML documentation if that's what your talking about. At least not until VB.NET 2005 or Visual Studio .NET 2005...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you
|
|
|
|
|
what do you mean?
"cheese"
|
|
|
|
|
i have created a dataset which is bound to the database noe i want to bind the DATAGRID on the form but the problem is that i don`t want all the columns of the table i only want 3 COLOUMNS and i don`t want even to create a query on dataset i.e i want whole of the table in the datset now how should i bound datagrid coustomisely, is there any method???
sm
|
|
|
|
|
Can I do my own dll with VB?
Pablo.Ar
|
|
|
|
|
Yes, Select ActiveX dll as the new project type. When you select 'make exe' from the file menu when you are finished it will compile the project as a dll.
Jon
|
|
|
|
|
yeah, I had already tried that (I should´a mention it), but when I compiled and tried to 'use' the .dll (like an api) from another one of my proj´s, there was an error that read 'There is no insertion point for my_1st_dll.dll', or sth of the like.
Well, 10x for the interest j15, any other ideas?
Pablo.Ar
|
|
|
|
|
Have you tested the dll by adding the project to a project group with just a test form? I would test like this first, then if all seems ok i would re-compile the dll and dont forget to regsvr32 it (should not need this as i think the process of compiling does this but it wont hurt)
Jon
|
|
|
|
|
oooooh, thanks for reminding me of regsvr32!!! I think that´s what it´s been all about. Well, I´ll try that (...and testing the dll from a vbg) and tell you about it later. Thanks a million.
Pablo.Ar
|
|
|
|
|
Hi all,
Is there any way to find out if a word is a reserved keyword of SQL Server with .NET? Or how can I retrieve all the reserved keywords of SQL Server?
Thanks.
Frank
|
|
|
|
|
There is no way to get SQL Server to return all the reserved words. You'll have to put a table together and type them in from the documentation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi coders
I'm very new to coding and desperately need some help
I am writing a small Internet cafe type program that controls internet access. It works fine by stopping the process "iexplorer". however users can still access internet via other applications and windows-explorer (explorer.exe). I can close any programs started after my application, but i cannot work out how to control / close explorer without forcing shut down. On my machine I can check if explorer has a mainwindowtitle and then process.closemainwindow. This works fine on my machine but on some other machines closing explorer (even if it has a visible open window) forces a shut-down.
any advice on:
a. ways to hide or restrict explorer
c. why my explorer launches a new visble process and others dont (i have set folder options "launch in seperate process" )
b. ways to deny access to Internet via any method
please help
|
|
|
|
|
check out this link it may help
http://www.winguides.com/registry/display.php/1288/
"Small Men Standing on Giants Is Better Than Giants Standing on Small Men"
|
|
|
|
|
I am working in Whidbey (VStudio 2005) using Visual Basic. I am trying to create a picture box that is simply a light transparent yellow (kind of like a highlighter) where I can see the controls, images, etc... that are underneath.
I was able to do this in VB6, but can't seem to figure it out in Whidbey. Anyone know how to do this?
Thanks!
|
|
|
|