PDA

View Full Version : VBA SelectionEventArgs



BigfootN
07-05-2016, 05:22 AM
Hello,

I am trying to create some event changes with bookmarks.

Even by taking the sample code from here (https://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.bookmark.selectionchange.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2) I was unable to know where the SelectionEventHandler lies, I was unable to find it.

Thank you very much in advance :)

Paul_Hossler
07-05-2016, 06:40 PM
SelectionEventHandler is part of Visual Studio, and not usable within VBA (as far as I know)




The Microsoft.Office.Tools.Word namespace contains types that extend and support the Microsoft Office Word object model in projects created by using the Office development tools in Visual Studio. For more information about these projects, see Office Project Templates Overview (https://msdn.microsoft.com/en-us/library/8553caee.aspx).

BigfootN
07-05-2016, 11:50 PM
Oh okay, thank you very much for your quick response.

So, do you know if there is a way to attach an event to a bookmark in VBA?

Thank you very much in advance :)

Paul_Hossler
07-06-2016, 07:53 AM
Maybe if the bookmark contains a Content Control. you could use the _Exit event, but it's still a little rough