J
John
Hi
I am getting conversion errors in the below code on the lines highlighted in
red. Would appreciate any tips on how to fix these errors.
Thanks
Regards
dim Company_ID As String
dim Temp As String
dim WordApp As Word.Application
company_id = "xxxx1"
temp = "c:\...\xxx.dot"
WordApp = New Word.Application
WordDoc = WordApp.Documents.Add(Temp) 'ERROR: Option Strict On disallows
implicit conversions from 'System.Object' to 'String'.
With WordDoc
.Variables.Add("CompanyID", Company_ID) 'ERROR: Option Strict On disallows
implicit conversions from 'System.Object' to 'String'.
End With
I am getting conversion errors in the below code on the lines highlighted in
red. Would appreciate any tips on how to fix these errors.
Thanks
Regards
dim Company_ID As String
dim Temp As String
dim WordApp As Word.Application
company_id = "xxxx1"
temp = "c:\...\xxx.dot"
WordApp = New Word.Application
WordDoc = WordApp.Documents.Add(Temp) 'ERROR: Option Strict On disallows
implicit conversions from 'System.Object' to 'String'.
With WordDoc
.Variables.Add("CompanyID", Company_ID) 'ERROR: Option Strict On disallows
implicit conversions from 'System.Object' to 'String'.
End With