B
blanic via AccessMonster.com
The below code opens a .txt or .doc file with word and passes the margins
properly, but what I want to do is open the file without changing the file
name if possible.
Dim wdApp As Word.Application
Dim doc As Word.Document
Set wdApp = New Word.Application
wdApp.Visible = True
Set doc = wdApp.Documents.Open("E:\CGinst\RPTS\07\Jan\2331.txt")
'I want to open 2331.31 for instance, instead of it being 2331.txt
With wdApp.ActiveDocument.PageSetup
.TopMargin = 0.35
.BottomMargin = 0.5
End With
properly, but what I want to do is open the file without changing the file
name if possible.
Dim wdApp As Word.Application
Dim doc As Word.Document
Set wdApp = New Word.Application
wdApp.Visible = True
Set doc = wdApp.Documents.Open("E:\CGinst\RPTS\07\Jan\2331.txt")
'I want to open 2331.31 for instance, instead of it being 2331.txt
With wdApp.ActiveDocument.PageSetup
.TopMargin = 0.35
.BottomMargin = 0.5
End With