Don't know what you tried but there is no reason not to replace both ..
Me!txdetails.Value = Replace(Replace(objDoc.content,vbCR,"(carriage return)"),vbTab,"(tab)")
Originally Posted by
ejm91206
.. without actually opening the document
Don't push your luck
It amuses me when people ask to get data from a file without opening it. Although there are various ways to open files it is impossible to read a file without opening it. In the case of a Word document you really are best using Word - trying to interpret Word format data with another application is damned hard work to say the least. Now, you can do it all in code so as to avoid the manual opening if that's what you want.
Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open FileName:="path\to\file.doc"
Me!txdetails.Value = objDoc.content
objdoc.close
objword.quit
Set objDoc = Nothing
Set objWord = Nothing