|
Sounds like instead of creating a new word document, you want to insert data into your already formatted document.
The easiest method I can think of would be an automated mail merge routine drawing data from a data source such as an excel spreadsheet which could contain the insertion field data you require for the word document.
Getting the data from a database to an excel spreadsheet is also easy using vb.net. Just create your array holding what data you need, then to export to excel call a routine such as "WriteSpreadsheetFromArray(MyArrayName)"
You will find the source code for the above function (WriteSpreadsheetFromArray) at http://www.vbforums.com/showthread.php?t=455162
Hope this helps you.
|
|
|
|
|
thank you !
But i want to put data on word document not excel.
Can you explain more clearly how can i do ?
Thank you!
|
|
|
|
|
Hi Alejx,
In your initial post you suggest your word document is already formatted with borders, logo and graphics and you wanted to place certain data in specific positions on the word document.
The easiest way to do this is using a mail merge routine. Almost every business office environment uses this method to product multiple word documents. The excel spreadsheet being also a Microsoft product is the ideal platform to hold the data you wish placed on the word document.
To understand this more fully, I suggest you google microsoft mail merge routines, but basically you get your already formatted word document and creat insertion points where you wish the data to go, then run the rountine which will cycle though the data on the excel spreadsheet and create your identical word documents with the data positioned where you wanted.
Is this clearer to you?
|
|
|
|
|
You can use the Interop.Word [^] namespace to create word documents, and something like iTextSharp[^] for PDF.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
i see there is 800x480 and other resolution in WP smartphone.
in visual studio, everytime i create an WP application, i get the same size WP form.
if i create an application based on that size, am i going to have problem with other WP smartphone with different screen resolution?
Thanks before.
|
|
|
|
|
I really need to find a way like dll or somthing to have a tab control with closing option like what happening in chrome..
plz plz someone help me ...!
|
|
|
|
|
I think this Code Project article may be helpful.
A Visual Studio 2005-like Interface[^]
There is no closing option in each Tab but there is a closing button at far right to close the active Tab .
|
|
|
|
|
You could have a context menu show when you right click that has close and then use that. Or, if you were advanced you could have the program draw the x bye the last tab.
Hope this helps
|
|
|
|
|
Can it posible bmp color image convert black and white for reduce byte (500 kb convert 50 kb) which stored in sql server?
|
|
|
|
|
Yes, that's possible. You can also store it as a jpg, making it just as small and keeping all those wonderful colors.
Bastard Programmer from Hell
|
|
|
|
|
hi guys,
i've installed windows phone SDK and i don't understand why it only give me Windows Phone OS 7 and OS 7.1 since there is 7.5, is that SDK OS or WP OS?
and is it possible to write WP application using VB.NET?
which one better for WP, C# or VB.NET?
thanks before,
|
|
|
|
|
Because the current version of the SDK supports 7.1 and it supports WP 7.5.
As for language choice, neither language is better than the other. It's just a matter of preference.
|
|
|
|
|
XNA Game Studio 4.0 >> Windows Phone Game (4.0)
should i code all of the game?
i don't see any object oriented there.
if that true then writing game must be so hard.
can you give me link to learn how to create game?
thankyou for always helping me.
|
|
|
|
|
Alpherattz wrote: should i code all of the game?
Huh? How else would a game get written?
Alpherattz wrote: i don't see any object oriented there.
It's all over the place. You can't avoid it in .NET and XNA.
Alpherattz wrote: can you give me link to learn how to create game?
All kinds of tutorials[^]
|
|
|
|
|
wow, i don't even know how to put image to the display if it's not object oriented.
thank you so much, i will try first.
modify*
btw, should i pay $99 to enable me to put my application into marketplace?
i heard some people said so in forums.
modified 12-Apr-12 22:37pm.
|
|
|
|
|
Hi,
I have an Access Data table with three fields (date, tippingB, and precip). I am using dataGridView to view this table and make changes. The third field in the table (precip) is dependent on second field (tippingB). I was wondering if there is a way to use a formula in the field so that when I put a number in the second field, third field automatically gets updated. The last step of the code is updating the access table in the access database (that works so far).
So, my question is if one could use a formula for a column in a dataGridView and also bind it to the dataTable so that when update command is used, the database gets updated.
Thanks,
Amanjot
|
|
|
|
|
The DGV is not Excel. There are no formula you can put into a cell.
Your code has to handle the CellValueChanged[^] event. You can then get the row and cell that changed from the event args, do your calculation and update the appropriate cell.
|
|
|
|
|
The answer given by Dave Kreskowiak is absolutely correct.
An alternative is to use Expression property of precip DataColumn object to calculate the value based on the value of the tippingB DataColumn as explained here
DataColumn.Expression Property[^]
After binding the DataTable to the DataGridView the calculated value in the precip column will be displayed in the DataGridView.
|
|
|
|
|
Whets the best way to…
Hi all
I have been tasked with creating an application that generates a flat-file in which the content changes depending on the users input; I.e. different record lengths and other flags and headers, etc.
Now my question is what is the best way to present this to the user filling in the front end? For example, I could use a dynamic run-time generated form or create a plug-in architecture or create different exe to do each job.
This application should ideally be easy to operate and easy to generate new templates so it can be maintained if I should move on.
Example Output:
Runtime]
Date=
Time=22:00:00
AllowErrors=FALSE
[Task.1]
Server=Employee
Module=Employee
Operation=AddUpdate
;======================================================================
;NB - STS CODE: Pending = 1, Active = 2, Terminated = 3, Inactive = 4
; Suspended = 5, Deleted = 6
; TERM_DATE: Format as YYYY-MM-DD
;See NL_Employee.doc for information on field formats and descriptions.
;======================================================================
[Data.1]
Employee,[EMPLOYEE_NO],[STORE_NO],,,,,,,,[STS_CODE],,,,,,,,,,,2099-01-01,,,,,,,,,,,,,,,,,,,,,,,,,
**END EXAMPLE**
NB These files can become quite complicated with multiple [TASK.X] and [DATA.X] sections
Any help with picking the best solution would be appreciated.
In addition, I class myself as a novice / intermediate VB programmer
Language Used: VB 2011 Express
Thanks
|
|
|
|
|
Instead of a form generated at runtime, I'd suggest a simple (data)grid. You could use plugins to parse different types of files, that would indeed make it a bit more flexible.
Bastard Programmer from Hell
|
|
|
|
|
Interesting thought however, the file also contains a [Runtime] section as well as (possible multiple) [Task.1] and [Data.1] sections (which contain different data and tags depending on the job). If the file was just a CSV file then it would be easy to implement your idea however, in light of the extra data in the file; im not sure how this would work.
Thanks for your input.
|
|
|
|
|
Badg3r1977 wrote: im not sure how this would work.
You could create a plugin to parse a section; load all plugins at startup, read a section, switch to the plugin that knows how to read/parse that section, and move on to the next one (until you run out of sections).
It'll probably take some experimenting to get it right, but it would allow you to create new plugins when sections change or get added. It should also make it easier to maintain the code in the long-run; you could write even test-scripts for each plugin/section.
Bastard Programmer from Hell
|
|
|
|
|
I have some proble with mailmerge in vb.net.
I have one template for mailmerge in word, but it has two language, sothat i need to table to connect and binding data into word, but i only know connect and binding data in word.
I need to help!
Thanks alot
AnneVuong
|
|
|
|
|
Your question makes no sense at all. Please rephrase.
|
|
|
|
|
We have programs in VB6, VB.Net 2005, 2008 and 2010.
Some of the VB.Net programs were converted from VB6 using the VB.Net converter (Just open the VB6 project).
All this is fine until yesterday.
We uninstalled a program written in VB.2010 via the control panel. Went fine. But now other programs, VB6, VB.Net 2005 and 2008 are having problems. Now have compile errors and reference errors.
We fixed the first. MSFLXGRD.OCX become unregistered (not deleted). Not sure why. We registered it and that fixed some problems.
I am not sure why reference to dlls in other program source bin folders were removed. Adding the reference to these fixed them.
Now in 1 of our 2008 programs we have an Undeclared MSXML2.XMLHTTP in
Dim pXMLHTTPObj As New MSXML2.XMLHTTP
This is on Win 7/64 Pro.
If we open the same programs on another machine from the same folder there are no errors. So probably another unregistered dll. (XP)
This program has a reference to
Microsoft XML, V4.0
which is in the obj\bin\debug folder (it is there) and adding it seems to have fixed that also.
I am now very fearful of uninstalling anything.
Can someone please explain what is happening and how I can safely uninstall????? PLEASE!!!!
Thanks
|
|
|
|