Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

Get default filename from bookmark content

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arne - 03 Sep 2005 11:03 GMT
How can  Word2000 suggest the save as filename from the content of a
bookmark?

This is part of my code from  the form.

Dim BMRange As Range
Set BMRange = ActiveDocument.Bookmarks("mysaveasfilename").Range
BMRange.Text = Me.txtSaveasfilename
'Reinsert the bookmark
ActiveDocument.Bookmarks.Add "mysaveasfilename", BMRange
Jonathan West - 03 Sep 2005 12:21 GMT
Put the same text into the Title property of the document.

ActiveDocument.BuiltInDocumentProperties("Title") = Me.txtSaveasfilename

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> How can  Word2000 suggest the save as filename from the content of a
> bookmark?
[quoted text clipped - 6 lines]
> 'Reinsert the bookmark
> ActiveDocument.Bookmarks.Add "mysaveasfilename", BMRange
arne - 03 Sep 2005 17:03 GMT
Thanks Jonathan, but it does not work, and I am not sure where to place Your
code
I place your code after; ActiveDocument.Bookmarks.Add "mysaveasfilename",
BMRange

I have seen some solutions about naming a doc on
http://word.mvps.org/faqs/macrosvba/SetDefFilename.htm and wonder why I do
not get the correct filename..

regards arne

.

> Put the same text into the Title property of the document.
>
[quoted text clipped - 10 lines]
>> 'Reinsert the bookmark
>> ActiveDocument.Bookmarks.Add "mysaveasfilename", BMRange
Jonathan West - 03 Sep 2005 17:29 GMT
Is this a file which has not yet been saved?

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> Thanks Jonathan, but it does not work, and I am not sure where to place
> Your code
[quoted text clipped - 23 lines]
>>> 'Reinsert the bookmark
>>> ActiveDocument.Bookmarks.Add "mysaveasfilename", BMRange
arne - 03 Sep 2005 19:36 GMT
The file has not yet been saved. I only want the filename to be set as the
default (suggested name). The user must have the option to save the document
with any name she wants.

> Is this a file which has not yet been saved?
>
[quoted text clipped - 25 lines]
>>>> 'Reinsert the bookmark
>>>> ActiveDocument.Bookmarks.Add "mysaveasfilename", BMRange

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.