![]() |
#4
|
|||
|
|||
![]()
The simplest way to change the arrangement of the dates is to use the Format function. I'd recommend that you look up the Help topic about this function to see all the things it can do (easy: after you type Format in the macro window, put the cursor inside the word and press F1). For this specific case, what you need is
Dim FBdate As String FBdate = ActiveDocument.ContentControls(3).Range.Text FBDate = Format(FBDate, "yyyy mmdd") At that point FBDate will have the proper form, and you can use it to make a file name. If you need to do other things with the date, such as adding days or months to it, investigate the data type named Date and the function CDate that converts strings to Date objects. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
cksm4 | Word VBA | 13 | 07-02-2019 07:48 PM |
retrieving notes in outlook that were deleted | donbmar | Outlook | 0 | 05-21-2011 12:18 PM |
![]() |
TessaLee | Word | 1 | 03-11-2011 12:51 AM |
Package for CD with links to Windows media player content and Flash Shockwave content | hectorh | PowerPoint | 4 | 10-15-2009 12:22 PM |
Templates: automatic text generation from Rich Text content control | Chickenmunga | Word | 0 | 10-01-2008 11:16 AM |