Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-22-2017, 08:45 AM
silentwolf silentwolf is offline Runtime Error 91 Windows 7 64bit Runtime Error 91 Office 2010 64bit
Novice
Runtime Error 91
 
Join Date: Dec 2016
Location: Austria
Posts: 16
silentwolf is on a distinguished road
Default Runtime Error 91

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
Read on the help file but can not realy understand what I need to change.

Many thanks for your help..

Silentwolf
Reply With Quote
 



Similar Threads
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
Runtime Error 91 Runtime error R6034 tallon Excel 4 07-08-2016 09:24 AM
Runtime Error 91 runtime error 1004 gbaker Excel Programming 11 06-06-2012 05:23 AM
Runtime Error 91 Runtime error 91 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft