Find and replace string in a word document
Find and replace string in a word document
I need to find a string in a word document and replace it. No idea how I can do it. Any help please?
Re: Find and replace string in a word document
.doc (binary) or .docx (XML)? If it's docx, unpack, open xml, find and replace. if it's binary, find a library to to it?
As you walk on by, Will you call my name? Or will you walk away?
Re: Find and replace string in a word document
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Find and replace string in a word document
@ wayne-c
I know it is binary
@ skywalk
I tried to, but gave me an error on Comate
I know it is binary
@ skywalk
I tried to, but gave me an error on Comate
Re: Find and replace string in a word document
@ wayne-c
How do I unpack the docx document?
How do I unpack the docx document?
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: Find and replace string in a word document
@ClueLess
doxc is a ZIP archive:
doxc is a ZIP archive:
Code: Select all
UseZipPacker()
If OpenPack(0, "C:\...\YourDocument.docx")
If ExaminePack(0)
While NextPackEntry(0)
Debug "Name: " + PackEntryName(0) + ", Size: " + PackEntrySize(0)
;UncompressPackFile()
Wend
EndIf
ClosePack(0)
EndIf