Reply
 
Thread Tools Display Modes
  #1   Report Post  
OHM \( Terry Burns \)
 
Posts: n/a
Default Saving Documents With Subject

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


  #2   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

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



  #3   Report Post  
OHM \( Terry Burns \)
 
Posts: n/a
Default

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





  #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







  #5   Report Post  
OHM \( Terry Burns \)
 
Posts: n/a
Default

Solved that too

--
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
...
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









Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
saving documents in word 2003 goes to a temp file rdoughton Microsoft Word Help 3 March 31st 05 09:08 PM
saving documents for another program dwayne Microsoft Word Help 2 February 28th 05 10:19 PM
Saving Mail Merge Documents Individually Lucy Mailmerge 1 January 20th 05 05:47 AM
Saving Documents Charles Microsoft Word Help 1 December 17th 04 04:33 PM
Saving Documents - Read Only Cindy M -WordMVP- Microsoft Word Help 0 December 2nd 04 10:53 AM


All times are GMT +1. The time now is 08:40 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"