rahuljain
04-18-2019, 04:29 PM
Hello,
I only have very basic and limited idea of coding and want to write a Macro in word file. I can understand a pre-written code and apply few tweeks into it but not able to write new VBA code. My objective is to take some input from user when new files with marco enables loads and as per use input to print values in Header.
This will be a single time process when file created and header will remain same in complete document.
Header in file is a table structured like below ( Screenshot also attached)
2233
Using a similar file, I have created a form to save the variables and strings. Also written down upto below code
'Update the fields in the header and footer
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
It's incomplete and i am not sure if this is correct. I want to make this table with logo and want to provide enter variable text highlited in yellow.
Please help to achieve this.
Please let me know if more information is required from my side.
I only have very basic and limited idea of coding and want to write a Macro in word file. I can understand a pre-written code and apply few tweeks into it but not able to write new VBA code. My objective is to take some input from user when new files with marco enables loads and as per use input to print values in Header.
This will be a single time process when file created and header will remain same in complete document.
Header in file is a table structured like below ( Screenshot also attached)
2233
Using a similar file, I have created a form to save the variables and strings. Also written down upto below code
'Update the fields in the header and footer
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
It's incomplete and i am not sure if this is correct. I want to make this table with logo and want to provide enter variable text highlited in yellow.
Please help to achieve this.
Please let me know if more information is required from my side.