Ok I am stymied. Please help!
I have gotten code to:
Open word
Open template
Copy cells (from excel)
Paste cells into word
HOWEVER
I want to create name for word document (cell A92 in excel)
Save word document as filename (cell A92 in excel)
As .doc
In folder C:\MidSouth\PENDING
Lock all cells against editing
EXCEPT one cell for signature (in excel cell is A85)
AND one cell for date (in excel cell is G85)
Then close document.
Here is my current code:
Sub CreateWordReport()
Dim WordApp As Word.Application
Set WordApp = New Word.Application
With WordApp
.Visible = True
.Activate
.Documents.Open ("C:\Mem1\Custom Office Templates\Installation Agreement.docm")
Sheets("Contract").Unprotect Password:=""
Range("A1:G92").Select
Selection.Copy
.Selection.Paste
Crossposted at https://www.excelguru.ca/forums/show...sing-excel-VBA
I have gotten code to:
Open word
Open template
Copy cells (from excel)
Paste cells into word
HOWEVER
I want to create name for word document (cell A92 in excel)
Save word document as filename (cell A92 in excel)
As .doc
In folder C:\MidSouth\PENDING
Lock all cells against editing
EXCEPT one cell for signature (in excel cell is A85)
AND one cell for date (in excel cell is G85)
Then close document.
Here is my current code:
Sub CreateWordReport()
Dim WordApp As Word.Application
Set WordApp = New Word.Application
With WordApp
.Visible = True
.Activate
.Documents.Open ("C:\Mem1\Custom Office Templates\Installation Agreement.docm")
Sheets("Contract").Unprotect Password:=""
Range("A1:G92").Select
Selection.Copy
.Selection.Paste
Crossposted at https://www.excelguru.ca/forums/show...sing-excel-VBA