-
Thanks for the suggestion to break it down and find the problem - see the tree in the forest so to speak.
Here's what solved it...
Set the string value from excel before opening the word application. Also, I didn't need .text at the end...
Here's the final code for those reading along.
Thanks again for your help and this forum.
[VBA]Sheets("Pin_Index").Select
xlvalString = Sheets("Doc_Index").Range("F1")
'Open Word Instance
Set wdApp = CreateObject("Word.Application")
wdApp.Visible = True
'Open Template as Document
wdApp.Documents.Add Template:=(pinString)
wdApp.Activate
'Prefill Data
With wdApp.ActiveDocument
.FormFields("docCategory").Result = xlvalString
End With
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules