
Not applicable
2016-10-21
12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Macro to select a field
I would like to write a macro to select a field -> currency. I have it written in the following, I know it is wrong, but just to give an ideal what I tend to achieve.
Sub SelectField
rem ActiveDocument.Fields(Currency).Select
Activedocument.getfield("Currency")
End Sub
I am trying to turn on/off the green light button of currency by Marco VBAscript once it is run.
1,199 Views
1 Solution
Accepted Solutions

Master II
2016-10-21
01:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try like below:
Sub Unselect
ActiveDocument.Fields("Currency").clear
End sub
hope this helps!
967 Views
3 Replies

Master II
2016-10-21
12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try like:
Sub SelectField
ActiveDocument.Fields("Currency").select "USD"
End Sub
This will set the Filter to "USD"
hope this helps!

Not applicable
2016-10-21
12:35 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, can I do de-select as well?
967 Views

Master II
2016-10-21
01:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try like below:
Sub Unselect
ActiveDocument.Fields("Currency").clear
End sub
hope this helps!
968 Views
