w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Retrieving text from a closed Word Document in a Word Template (VBA)

How about something like:

Public Sub GetData()
   Dim x As Document
   Set x = Application.Documents.Open("E:	esting	est.docx", ReadOnly:=True,
Visible:=False)
   Dim data
   Set data = x.Content
   ' do something with the content or the document
   MsgBox data
   'close the document
   x.Close
   Set x = Nothing
End Sub




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.