![]() |
#1
|
|||
|
|||
![]()
Hi guys,
I am not that good in word VBA and need some advice to this problem... Below is the code but I do get a runtime error 91 in the line marked below. Object Variable or with block not declared.. Could someone tell me what is causing this problem? Code:
Property Get Textmarke(strName As String) As String DieseDateiBenutzen If p_docDO.Bookmarks.Exists(strName) Then Textmarke = p_docDO.Bookmarks(strName).Range.Text Else Textmarke = "" End If End Property Property Let Textmarke(strName As String, strText As String) Dim rngTM As Range If p_docDO.Bookmarks.Exists(strName) Then Set rngTM = p_docDO.Bookmarks(strName).Range rngTM.Text = strText rngTM.Bookmarks.Add strName Else MsgBox "Diese Textmarke fehlt: " & strName, vbCritical End If End Property Many thanks for your help.. Silentwolf |
#2
|
|||
|
|||
![]()
Is p_docDo declared as a document object and set to some opened document?
What Textmarke a property of? |
#3
|
|||
|
|||
![]()
Hi,
thanks for your reply! I found the problem ) I did not set the sub in the Property Let procedure! DieseDateiBenutzen was missing in the property let statement! Thanks for pointing it out to me! Silentwolf |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel runtime error 48; error in loading dll | mwittman5 | Excel Programming | 0 | 01-19-2017 05:18 PM |
![]() |
tallon | Excel | 4 | 07-08-2016 09:24 AM |
![]() |
gbaker | Excel Programming | 11 | 06-06-2012 05:23 AM |
![]() |
waldux | Word VBA | 1 | 03-04-2011 11:25 PM |
Runtime error 5487 - Word cannot complete the save to to file permission error | franferns | Word | 0 | 11-25-2009 05:35 AM |