View Single Post
  #4   Report Post  
OHM \( Terry Burns \)
 
Posts: n/a
Default

Actually, I think ive worked this out. You have to protect the document.

One other question. IS there an way of filling in the field with a date when
created


--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"OHM ( Terry Burns )" wrote in message
...
Thanks for your reply. I can fill the title field with this code.

Application.ActiveDocument.BuiltInDocumentProperti es(WdBuiltInProperty.wdPropertyTitle)
= _
Application.ActiveDocument.FormFields.Item(1).Resu lt

However, Im not sure how to keep the field from getting deleted. I dragged
a texbox to the subject line but two things elude me.

1.) How to Enter ( and hence run a macro ) the field

2.) How to Exit ( and do the same ) and stop the field getting deleted.



--
OHM ( Terry Burns ) * Use the following to email me *

Dim ch() As Char = "ufssz/cvsotAhsfbuTpmvujpotXjui/OFU".ToCharArray()
For i As Int32 = 0 To ch.Length - 1
ch(i) = Convert.ToChar(Convert.ToInt16(ch(i)) - 1)
Next
Process.Start("mailto:" & New String(ch))
--
"Suzanne S. Barnhill" wrote in message
...
The default filename that Word proposes is one of the following:

1. The first text in the document, up to the first punctuation mark or
line/paragraph break.

2. The text in the Title field of the document Properties. If the Title
field of the document template is not empty, the Title field of the
template
will be propagated to the document.

Unless the subject line is the first (non-header) text in the document
(1)
doesn't do you any good, but you can use (2) if your template includes a
UserForm to ask for the subject. This can then be written to the Title
property and automatically inserted in the document as the subject line
via
a Title or DocProperty field in the template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"OHM ( Terry Burns )" wrote in message
...
HI

There is probably a real easy solution to my question but here goes.

I want to save letters with the default name being the subject line of
the
letter. When I say subject, Im not talking about the document
information,
but the acutal line on the letter

Subject: This is the subject I want to use as the default filename

I want to prefix it with the initials of the current user so the
document
should be saved something like

TB-This is the subject I want to use as the default filename


Any help would be appreciated

Many Thanks