o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Word document, change characters -

I have this code to change ALL characters in a WORD Document into character (_). It works but there are also some pictures in the doc and they get lost when I run this.
Its also very slow running this. I there someone have suggestions about this ?

Code:
Private Sub Command1_Click()
Dim Word As Word.Application
    Set Word = CreateObject("Word.Application")
    Word.Documents.Open ("C:\test.doc")
    Word.Documents(1).Select
    
    For i = 1 To Word.Documents(1).Characters.Count
      If Word.Documents(1).Characters(i) <> " " Then
        Word.Documents(1).Characters(i) = "_" 'wdUpperCase
      End If
    Next
    
    Word.Documents(1).Close (True)
    Word.Quit
End Sub

 

Word document, change characters -
I have this code to change ALL characters in a WORD Document into character (_). It works but there are also some pictures in the doc and they get lost when I run this. Its also very slow running this. I there someone have suggestions about this ? Code: Private Sub Command1_Cl


Insert characters into Word Document -
I'm writing a little app that will basically insert foreign characters into any document. It will sit at the top of the screen and when you click on a button, it will put that character in, for example, a Word document. But it's that bit I can't do! How do I get my app to insert at


Microsoft Word - reading characters -
Hi there I need to read characters in word document and insert an enter (new line) every 60 characters. Can anybody help with what command let me reed the charcters and chceck if its enter or not ? If there is no enter afer 60 characters then I can put one. Cheers


Copying from excel to a word document -
I need some help with the following problem. I am new to VB but do have several years experience with C, C++ and a few other languages. I would like to create a script that will take information from an excel spreadsheet and insert the text and or values from the cells into a pre fo


Setting Word Document Properties -
Does anyone know how to write to the builtin and custom document properties in a Word document? What I want to do is use VB to insert bits from a database into a Word template with preset fields. I don't want to just stick it in as standard text because then it's hard to read out ag


Black Belt API in Com Add-ins -
Hi All, Problem. I need to shift characters on a word2000 document left/right by pixels. Using VB6SP4 ent and Word2000. I can use standard VBA to shift characters by a character length (whitespace). So far I can enumerate the word app to get the correct handle for the document. I th


Want to eliminate symbols from the content of the word -
Hi all, I am just creating some sort of macros in MS Word. In that macro, I want to eliminate all the characters except "a to z", "A to Z" and "0 to 9" (i.e., all characters and Digits). For example, the text in Word Document, "I am currentl


Word: End of Document -
In Word, how to check whether the current cursor position is at the end of the document. Basically, using a loop, I am traversing all the characters of the document with .Selection.MoveRight method. I want to exit the loop when the .Selection is at the end of the document. Pls gu


Set Author property in MS Word Document -
In my VB6 app I need to go through a document and have it change the Author and Company document property (on the File > Properties menu and then the Summary Tab) of an MS Word Document. I am using Word XP, but that shouldn't matter. I am having trouble finding the right command t


Change Text layout to # char' per line -
Hi Is it possible to create a macro in Word to change a selection of text in a word doc, to a specific number of characters (37) per line? Changing margins does not work for this purpose. I can do it manually, but is very slow. ie count across 37 characters then hit 'return'


Change 'Document Name' property for a print job -
I need to change the 'Document name' property of a job sent to a printer queue - I'm working in Windows 2000 using VB6 sp5. In particular, I'd like to change the 'Document Name' property of a job submitted from a Ms Word object using the 'PrintOut' method of the Ms Word App object v


ole and word document -
I am using ole to embed a word document. It is working fine, But the problem is the document gets refreshed after each interval of time. Hence its focus goes to the starting position of the document. And I lost the current position of cursor in the document I know the UpdateOpt


Inserting a word document into a form -
I have a form (part of an MDI project) on which I want a word document. I put an OLE object on the form and inserted the word document but when the form is opened there is no word document. I guess I'm doing it wrong. Can someone please tell me how to properly add this word document


Using RTF with Word - (Solved) -
I have a VB app that creates a word document. Part of the data I need to use in the document are product names that use multiple fonts because of the use of greek characters in the name. I have stored the product names in the RTF format in a SQL server database. My problem is when I tr


WORD: formatting text -> who knows the format characters -
This is the stuff I have: - plain text (with 'tags' e.g. "this is <b>bold</b>." - a connection to word (via "dim objWord as word.application") I can paste the text into a word document, but my question is the following: can I convert the text s


Problems with word -
I am developing a COM AddIn for Microsoft Word using Visual Basic .NET. 1) How can I open an existing document or add a new document without getting a new word instance? My code looks like the following at the moment: objWordInstance.Documents.open(Filename:=mstrDateinameMitPfad


Word AddIn will not start in second document -
Hi, Hi, I wrote a word addin (Office Developer 2000 - VBA) that loads at startup of Ms Word. In the document with which Ms Word starts (document 1) everything is OK. I can also run the addin several times within Document 1. When I open another (new or saved) document, document 2,


Hey guys, serious question... -
Does anybody have a MS word password breaker? I have a word document I've forgot the password to and would rather like to get back in it. So far, I've only managed to find demo versions of software which will break 3 letter passwords and no more and I know for a fact this passwor


How can i extract text from a word document TextBox -
i have been working on word Document files. each document has same text format. i m using the code below to extract text from it, Code: Dim sFileName As String 'Name of files within the folder will be stored Dim i As Integer 'This will count the files read***


change word on the footer of a word document -
I like to change the word "Version 1.0" to "Version 2.0" on every page on the footer of a word documents using VB6 with the word document minimised when the program is making the change. Does anyone know how to do this? Thanks.


A long word within a string... -
I'm trying to release my website before next Monday and this one thing is bothering me but I don't have time to look into it. In one place, my users can enter a large string, up to 1024 characters in length. This is fine, however I want to limit the character length for a single word s


Loading Word doc To RichTextBox -
Hi all, Does anyone know how 2 load a word document into a RichTextBox control and keep the format of the word document. I've tried LoadFile but certain parts of my RichTextBox lose some of the formatted data of the Word document. Also have tried saving the Word document as a rich


Open a word file in a Ritch Text Box Control -
Hello all I have to open a microsoft word document in a ritch text box(RTF). but in my application it opens word file but in that it display's number of ascii characters. i want to open as it is. so how colud i open a word document . plz reply me if any know's this thanks Dhanu_pat


[Word 2003] Writing user-defined metadata to Word documents -
hi all, can anyone tell me if it is possible to write additional metadata into Word documents? i know you can define your own as custom properties, but this is limited to 255 characters and easily accessible. the reason i ask is if i had keylogger record some data about activitie


Manipulating Microsoft Word Document -
How can I load a Word Document into memory; modify it; and display it out to the user? The original document that I load, I don't want that to be change but acts more like a template. Thank You


[2005] Creating a Word document -
I'd like to create a word document using nothing but VS2005. Would it be possible to create a custom document class ? (inheriting from the word.doc class?) I'd like to be able to create the document, preview it, print it, (save it -doh!), have different styles for different sec


Word Document to HTML -
Hi, I'm new to VB so go easy on me. I need to write some code that opens a Word Document and then either extracts the data so that a HTML document can be created or simply resaves it as an HTML document. I've had a quick look around the net and tried adding an Object Reference to Mic


Extracting Text from word TextBox -
Dear Helpers i have been working on word Document files. each document has same text format. i m using the code below to extract text from it, Code: Dim sFileName As String 'Name of files within the folder will be stored Dim i As Integer 'This will count


MS Word Object Question -
Does anyone know if there is a way to change the Title of a document in MS Word through code. The way you change it manually is through the File|Properties and it is on the second tab. I am trying to change this field through the Word 9.0 object in VB. I tried to record a macro, but


Imbed a Word Document On a Form. -
I am trying to set up a form with an MS-Word Document. The word document will be on the form and not a stand-alone application. To set this up I selected components, then insertable objects, and added a Microsoft Word Document. Now I added the new object to the form. I also have s


Word -VBA / accessing content of a word document -
Group: Can you access the conent (document.WholeStory or document.Conent) of a Word document without opening the document or triggering the OpenDocument event? Mark


Corrrupt Doc -
My application uses VBA to creates a word document, which is saved in the one particular folder.There is no problem when user first creates the document, in this document there are lot of word macros which takes standard document and fills with the datas taken from the Different appli


Word document inside IE !!!!!! -
How do we get the word functionalities when I open a word document through an IE?? I am able to view all the menus and work with the file same way as a standalone word document. Is it possible to get anyother application like Notepad or wordpad documents inside IE like word??


Wildcard Searching in Word -
I am trying to write a simple macro to highlight all the xml tagging of a document in Word, but Word wont seem to let me use the characters '<' and '>' in a wildcard search because they're reserved for the beginning and the end of a word. Does anyone know a way around this, or i


Printing landscape in Word -
I want to send the landscape characters to a word document so that I can change the page orientation to landscape. Their Hex value is 1b 26 6c 30 4f. I have tried chr(1b)& chr(26) & chr(6c) & chr(31) & chr(4f) and &H1B& & &H26& & &H6C&a


change TextBox size according to Text -
I need to create a textbox that is 76 characters wide and 46 rows. How can I do this beyond eyballing it. This is because what they type in a text box has to appear the exact same on a report. What I need is once they have typed in 76 characters it needs to go to the second line whe


VBA Word.. -
im opening a MS word document using vb6. whenever i close the document MS Word always ask me if i would like to save the changes in the document. What i want is that the MS word will close without asking me if i would like to save changes (don't save the document). Is this possible?


Modifying Word Document and/or HTML file with ASP -
Hi, I've been wondering whether I can modify a word document or HTML file with ASP. For example with HTML file, I want the user to be able to edit the HTML file in a WYSIWYG environment (something like when we post a new thread in this forum, we can change the font, font size etc.),


searching for word in word doc -
I want to write code so that if a word in a variable in the vba behind word is equal to a word in the word document, it changes that word in the document to bold. How would i do that?


how to change permission of MSWord doc from access VBA -
Hello folk, Need some help. How can I change the permission mode (Read Only,RW etc) of a word document when opening it from Access VBA. Below is the function I am using to open MSWord doc. This function is called by commanbutton_Click subroutine. My next question is, how can I detec