Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Replacing text

Replacing text

Scheduled Pinned Locked Moved C#
tutorialcssdatabasesysadminalgorithms
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Christer Claesson
    wrote on last edited by
    #1

    I have some documents stored on a server, I want to use these as a template and populate them with some infromation from a database. At first I thought of automating Word, this worked nicely on my local machine when I tried it out as a normal winform. But then when I tried it on the webpage I got a "The message filter indicated that the application is busy" when I tried using it. I've looked around alot and found no solution for this, so I'm more or less ready to drop all the work I've done so far regarding this.(Iterated through bookmarks and replaced the text) Now I've been thinking that Word 2003 is saved as XML, so perhaps I could replace text in that instead. In the Word file I have certain keywords I want to replace, for example User = @usr then I would like to replace @usr with something from the database. Problem I have is that XML is a very big subject and I have problem figuring out if this is possible or not. I dont want to spend more days(wasted alot of days on learning how to automate word)if it is not possible(In a easy way). So, anyone have any tips how I can do or tips on what I should read up on. Or is it possible to use any other way of searching the text and replacing instances like that in a easier way?(We are talking about Word 2003 documents only, or if it is easy 2000 documents too)

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups