How to Edit a MS Word File from VB .NET?
hi all,
Currently, i want to edit a existing Word File by using VB .NET Add in.
Below are my codes (for Button only):
PrivateSub MyButton_Click(ByVal Ctrl As Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault AsBoolean) Handles MyButton.Click
MsgBox("Would you like to generate Offer Letter?", MsgBoxStyle.OKCancel)
If MsgBoxResult.OK Then
Dim name, position, salary AsString
Dim add AsString
name = InputBox("Please insert Candidate's Name", "Get Candidate's Name")
add = InputBox("Please insert Candidate's Home Address", "Get Candidate's Address")
position = InputBox("Please insert Position", "Get Position")
salary = InputBox("Please insert Salary", "Get Salary")
EndIf
EndSub
*The value from Input Box is used to Edit few parts of the word document that user open
How to achieve that?
Thanks for reply.
thanks and regards,
powerteh
hi all,
Currently, i want to edit a existing Word File by using VB .NET Add in.
Below are my codes (for Button only):
PrivateSub MyButton_Click(ByVal Ctrl As Microsoft.Office.Core.CommandBarButton, ByRef CancelDefault AsBoolean) Handles MyButton.Click
MsgBox("Would you like to generate Offer Letter?", MsgBoxStyle.OKCancel)
If MsgBoxResult.OK Then
Dim name, position, salary AsString
Dim add AsString
name = InputBox("Please insert Candidate's Name", "Get Candidate's Name")
add = InputBox("Please insert Candidate's Home Address", "Get Candidate's Address")
position = InputBox("Please insert Position", "Get Position")
salary = InputBox("Please insert Salary", "Get Salary")
EndIf
EndSub
*The value from Input Box is used to Edit few parts of the word document that user open
How to achieve that?
Thanks for reply.
thanks and regards,
powerteh
Last edited: