Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Oct 2007
    Location
    Copenhagen, Denmark
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make WordArt not-selectable to user (Word 2003 SP3)

    Hi my friends,

    Is it in any way possible to block access to a WordArt object in a Word doc?

    The reason why I want this is because I want to make the VBA behind 100% in control of it - in a way so the drawing can not even be selected by my user like with ctrl+a? Must be something about protection level or something if at all...? Must act like a watermark in other words.


    kind regards,
    Michael Mogensen, dk.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    You can protect the document for forms (Tools | Protect Document...).
    Your VBA code would have to unprotect the document, manipulate the WordArt object, then protect the document again.

  3. #3
    New Lounger
    Join Date
    Oct 2007
    Location
    Copenhagen, Denmark
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    Hi Hans,

    Ya I know I can do so for the entire form - but what if its not a form but a plain doc - can I protect individual objects in W2003 - I think not?

    Kind regards,
    Michael.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    You can't protect individual objects, but you can specify which sections are protected in a document protected for forms. So you could insert continuous section breaks before and after the WordArt object, and protect just the section it is in.

  5. #5
    New Lounger
    Join Date
    Oct 2007
    Location
    Copenhagen, Denmark
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    You mean like:

    Selection.InsertBreak Type:=wdSectionBreakContinuous

    ?

    Michael.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    If you want to insert the WordArt object using VBA, you can use a line like that to insert a continuous section break.

    Of course, it's easier to insert the WordArtobject and section breaks manually, and then use code later on to manipulate the WorArt object.

  7. #7
    New Lounger
    Join Date
    Oct 2007
    Location
    Copenhagen, Denmark
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make WordArt not-selectable to user (Word 2003 SP3)

    OK, now I have like this:

    Private Function AddWordArtWatermarks(strText As String)
    Call SaveCursorPos
    Application.ScreenUpdating = False
    Dim iPage As Integer
    For iPage = 1 To GetNumberOfPages()
    Selection.GoTo what:=wdGoToPage, Which:=wdGoToNext, Name:=CStr(iPage)
    Selection.InsertBreak Type:=wdSectionBreakContinuous
    Call AddWordArtWatermark("Kopi", iPage)
    Selection.InsertBreak Type:=wdSectionBreakContinuous
    Next
    Application.ScreenUpdating = True
    Call RestoreCursorPos
    End Function

    Making the normal document a formular in this way enables - or rather makes it possible to disable - a section (like you just said). On the other hand I'm forced to work with a formular... not sure how nice that is?

    But what you told me works 100% Also I have to keep right on track lcoking only sections 2 ,5, 8, ... in such a formular and keeping all the other sections open. I just did that from the gui - that is I opned 1, 3, 4 and 6 in a 2 page document. A lot of work to make watermarks work independent of headers :-|

    Thanks Hans,

    Kind regards,
    Michael.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •