drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 566
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and Thanks in advance!
I am Opening a Word Doc Using Excel/VBA (No problem)
Here this does not work:
I get this err Code:
Thanks!
I am Opening a Word Doc Using Excel/VBA (No problem)
VBA Code:
Dim wApp As New Word.Application
Dim wDoc As Word.Document
wApp.Visible = True 'False
Application.DisplayAlerts = False
Set wDoc = wApp.Documents.Open(wPageFile, False)
'wPageFile = Is a existing FullName File
Dim docMultiple As Document
Set docMultiple = wApp.Documents(1)
docMultiple.Content.Select 'Selects the entire Word Dument (I do not know If this is necessarym If no avoid selecting the entire word doc
Here this does not work:
VBA Code:
docMultiple.Style = ActiveDocument.Styles("Normal")
VBA Code:
'ActiveDocument.FullName = wPageFile
I get this err Code:
VBA Code:
?Err, Err.Description
438 Object doesn't support this property or method
Thanks!