473,569 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create a Word XML file based on a template and fill it with user input???

Hello,



I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow changees if the file gets opened with i.e. notepad). Does anybody know how I can do this or even better has some code?
Best regards

Daniel Walzenbach

P.S. If you need to contact me simply remove ".NOSPAM" from my email address.
Nov 20 '05 #1
7 4983
Hi,

The office system 2003 uses xml natively. Here is a link to some documentation.

http://msdn.microsoft.com/office/und...ew2k3xmlom.asp

Ken
---------------------------
"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hello,



I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow changees if the file gets opened with i.e. notepad). Does anybody know how I can do this or even better has some code?
Best regards

Daniel Walzenbach

P.S. If you need to contact me simply remove ".NOSPAM" from my email address.
Nov 20 '05 #2
Thank you Ken,

this great!

Daniel
"Ken Tucker [MVP]" <vb***@bellsout h.net> schrieb im Newsbeitrag news:u0******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

The office system 2003 uses xml natively. Here is a link to some documentation.

http://msdn.microsoft.com/office/und...ew2k3xmlom.asp

Ken
---------------------------
"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hello,



I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow changees if the file gets opened with i.e. notepad). Does anybody know how I can do this or even better has some code?
Best regards

Daniel Walzenbach

P.S. If you need to contact me simply remove ".NOSPAM" from my email address.
Nov 20 '05 #3
Daniel,

If I understand you correctly, you wish to design a template in Word with 'place holders' for data which are filled by users in your vb.net application.

I don't think you need an XML approach at all. All you need to use are Bookmarks. Using bookmarks as 'Data Place-Holders' is a std practice. To fill the bookmarks with user entered data, use Office automation.

To control editing, use need to use the 'Forms' toolbar in word when you design your template. Right click on the main toolbar in word and see what options you have in the forms toolbar.

Note: You have to click on Lock button to enable editing restrictions.

"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:uD******** ******@TK2MSFTN GP09.phx.gbl...
Thank you Ken,

this great!

Daniel
"Ken Tucker [MVP]" <vb***@bellsout h.net> schrieb im Newsbeitrag news:u0******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

The office system 2003 uses xml natively. Here is a link to some documentation.

http://msdn.microsoft.com/office/und...ew2k3xmlom.asp

Ken
---------------------------
"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hello,



I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow changees if the file gets opened with i.e. notepad). Does anybody know how I can do this or even better has some code?
Best regards

Daniel Walzenbach

P.S. If you need to contact me simply remove ".NOSPAM" from my email address.
Nov 20 '05 #4
Daniel,

If I understand you correctly, you wish to design a template in Word with
'place holders' for data which are filled by users in your vb.net
application.

I don't think you need an XML approach at all. All you need to use are
Bookmarks. Using bookmarks as 'Data Place-Holders' is a std practice. To
fill the bookmarks with user entered data, use Office automation.

To control editing, use need to use the 'Forms' toolbar in word when you
design your template. Right click on the main toolbar in word and see what
options you have in the forms toolbar.

Note: You have to click on Lock button to enable editing restrictions.
Nov 20 '05 #5
Hello,

I want to create the file on a webserver and deliver it to a user. I always thought that word automation shold only be used on the user's client. Am I right with this assumption? I thought that it might be easier for me to create a XML file on the server than a .doc file.

Greetings
Daniel

"Nice Chap" <Ni******@Plasm aDyne.com> schrieb im Newsbeitrag news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
Daniel,

If I understand you correctly, you wish to design a template in Word with 'place holders' for data which are filled by users in your vb.net application.

I don't think you need an XML approach at all. All you need to use are Bookmarks. Using bookmarks as 'Data Place-Holders' is a std practice. To fill the bookmarks with user entered data, use Office automation.

To control editing, use need to use the 'Forms' toolbar in word when you design your template. Right click on the main toolbar in word and see what options you have in the forms toolbar.

Note: You have to click on Lock button to enable editing restrictions.

"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:uD******** ******@TK2MSFTN GP09.phx.gbl...
Thank you Ken,

this great!

Daniel
"Ken Tucker [MVP]" <vb***@bellsout h.net> schrieb im Newsbeitrag news:u0******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

The office system 2003 uses xml natively. Here is a link to some documentation.

http://msdn.microsoft.com/office/und...ew2k3xmlom.asp

Ken
---------------------------
"Daniel Walzenbach" <da************ **********@freu denberg.de> wrote in message news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
Hello,



I want to create a Word XML file based on the input users make in a VB.NET application. I imagine creating a template in Word and saving it as a XML file. I then want to fill the template (in my application) based on the user input. When the document gets opened there should be fields users can change but others should be prevented from beeing changed (I know that an "open" file format like XML can always be modified to allow changees if the file gets opened with i.e. notepad). Does anybody know how I can do this or even better has some code?
Best regards

Daniel Walzenbach

P.S. If you need to contact me simply remove ".NOSPAM" from my email address.
Nov 20 '05 #6
Hi Daniel,

Yes.
If you are automation office in the server side, Here is link you may need
to pay attention.
257757 INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/?id=257757
So I think Ken's suggestion is better one.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #7
Daniel,

Yes, you are right, if you are creating the documents on the server, XML is
the best approach as if you use office automation you will also encounter
some licensing issues.
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5371
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the webuser to select the template, merge his DB record, and produce a formatted document that can be printed or downloaded. We need to do this...
2
13494
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a...
5
7971
by: steven | last post by:
Hello, I've created a Word-template for a letter. I've made some fields in the template (such as 'customer number', 'name', ...) as follows: insert field - DocVariabele with name 'customer number' and 'name'. Now I want to fill these fields from my application and print them: Dim myWord As New Word.Application...
6
1577
by: strawberry | last post by:
I've written a (single-page) script that works like this; If no values are posted to it, the script creates a form page for a user to fill in and 'submit'. If values are posted to it (i.e. the user filled in the form), the script renders a page of html with the user-supplied values. Straightforward stuff, however, if values are posted...
2
2181
by: jmar | last post by:
I am updating a VB4.0 quote generation program to VB.net. The old program takes user inputs, performs calculations, saves the data to Access databases and uses Crystal Reports 5.0 to generate a quote. A while back users obviously wanted to be able to edit/e-mail the quote (these ancient Cyrstal 5.0 reports don't allow PDF creation) so I...
5
3728
by: jmar | last post by:
I posted a week ago and received one response. I'm looking for the opinion of several experienced .NET people before I proceed so I'm posting again. Sorry for the repost... I am updating a VB4.0 quote generation program to VB.net. The old program takes user inputs, performs calculations, saves the data to Access databases and uses...
23
7371
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these in an array. The application compiles but aborts without giving me any useful information. What I suspect is happening is infinite recursion....
15
5249
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7668
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.