Word 2007 VBA: Assigning the entire text of a document to a variable


i want able assign entire document (e.g., c:\wordforms\test_document.doc) variable can manipulate it.

 

how done?

declare variable

strentiredoc string

give variable value

strentiredoc = activedocument.range.text

 

assuming c:\wordforms\test_document.doc both open , activedocument.  if open not activedocument, then:

strentiredoc = documents(test_document.doc)

however, can manipulate whatever want without putting entire document variable.  in fact, bet on it.


gerry


Microsoft Office  >  Word IT Pro Discussions



Comments

Popular posts from this blog

server manager error: ADAM.events.xml could not be enumerated.

Cannot access Anywhere Access using domain name?

WMI Failure: Unable to update Local Resource Group