![]() |
#1
|
|||
|
|||
![]()
In my opened WORD document I have a bookmarked text (the Title, in this case).
How do I read and assign this Title text as a variable in VBA ? I will be using this variable to access other files with the Title in the filenames. Thanks ! |
#2
|
|||
|
|||
![]() Code:
Sub ScratchMacro() 'A basic Word macro coded by Greg Maxey Dim strText As String strText = ActiveDocument.Bookmarks("Title").Range.Text End Sub |
#3
|
|||
|
|||
![]()
Thanks ! It worked perfect...
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MJP143 | Excel | 1 | 02-11-2013 05:07 AM |
![]() |
diouna | Excel | 3 | 07-10-2012 09:43 PM |
![]() |
tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |
![]() |
tinfanide | Word VBA | 2 | 12-05-2011 03:41 AM |
Assign name to a group in word document | pankaj_saha | Word | 0 | 11-12-2009 10:59 PM |