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 / July 2007

Tip: Looking for answers? Try searching our database.

Add an invisible comment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Warrio - 18 Jul 2007 11:16 GMT
Hello!

Sorry for the previous post in French...

I'm wondering if it is possible with VBA to add a comment to a new document
created in with code as well.
With MsAccess, there is for each control, a property "Tag" that allows to
add any string

I unfortunately cannot add a line into one of the document's pages (even in
small and in white font) because it would change the general layout of the
document.

and because it is a new document, I cannot give it a new variable and then
set it...

Thanks for any suggestion
Jay Freedman - 18 Jul 2007 15:09 GMT
If it's a comment about the document as a whole, rather than about some
particular location in the document, you can add a custom document property.
It will be visible on the Custom tab of the File > Properties dialog, but
otherwise invisible. In VBA help, look up the Add method of the
CustomDocumentProperties collection.

If you don't want the comment visible even in a dialog, but still accessible
to VBA code, add a document variable. Look up the Add method of the
Variables collection.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Hello!
>
[quoted text clipped - 13 lines]
>
> Thanks for any suggestion
Warrio - 18 Jul 2007 15:55 GMT
Thanks a lot!

> If it's a comment about the document as a whole, rather than about some
> particular location in the document, you can add a custom document
[quoted text clipped - 23 lines]
>>
>> Thanks for any suggestion
Warrio - 18 Jul 2007 18:47 GMT
if it could help someone, here is the syntax...

myDoc.CustomDocumentProperties.Add Name:="CommentName", Value:="coment
balabla", Type:=msoPropertyTypeString

> Thanks a lot!
>
[quoted text clipped - 25 lines]
>>>
>>> Thanks for any suggestion
 
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.