Re: Bookmarks
From: Joanne (JoBobBuss_at_sbcglobal.net)
Date: 09/27/04
- Next message: xtcsuk: "Find"
- Previous message: Howard Kaikow: "Re: VBA code not deleting macros"
- In reply to: Malcolm Smith: "Re: Bookmarks"
- Next in thread: Malcolm Smith: "Re: Bookmarks"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 27 Sep 2004 14:57:33 GMT
Malc
Yes, I tried using breakpoint and f8 to watch what is happening. As I
said, when it reaches 'do while not oRst.eof' and I hit f8, on these 4
files only, it drops out of the loop and refuses to do the
'setbookmarks' routine.
I tried recreating the 4 docs yesterday, but that did not solve the
problem either. I am at a loss
Joanne
Malcolm Smith wrote:
>In article <emvTA18oEHA.800@TK2MSFTNGP14.phx.gbl>, JoBobBuss@sbcglobal.net
>(Joanne) wrote:
>
>> My error, Malc
>> I failed to replace .item with oDocName.Bookmarks in the second
>> statement.
>>
>> All is corrected and running well now and I'm sure you've helped me
>> make the app more reliable.
>>
>> But, this did not do anything for the 4 files that will not work
>> right, which is how we started this conversation again in the first
>> place.
>>
>> I create a recrodset with only these 4 files but when the routine gets
>> to the 'do while not oRst.EOF' it must be thinking it is at the eof
>> because it drops out of the loop here and skips the entire set of
>> statements to set the bookmarks. And of course sFilename = ""
>> because the routine drops out of the loop before the variable receives
>> a value.
>>
>> If Not oRst Is Nothing Then
>> Do While Not oRst.EOF
>> sFilename = "" & oRst("DocNamePath")
>>
>> Strange since 18 of the 22 docs do as expected. That is what makes me
>> suspicious that these 4 docs are corrupt in some way.
>>
>> As always, thanks a great deal for your time and expertise
>> Joanne
>>
>> Malcolm Smith wrote:
>>
>> >In article <#Ir6xgzoEHA.1176@TK2MSFTNGP12.phx.gbl>,
>> >JoBobBuss@sbcglobal.net (Joanne) wrote:
>> >
>> >> If oDocName.Bookmarks.Exists("FName") = True Then
>> >> oDocName.Bookmarks("Fname").Range.Text = Nz(Me!FName, "")
>> >> End If
>> >> Causes the error
>> >
>> >
>> >Again, which statement causes the error? I can see two here.
>>
>>
>
>
>Can you put a breakpoint at this point and then see what values are placed
>in the variables as you single-step (F8) through the code?
>
>- Malc
- Next message: xtcsuk: "Find"
- Previous message: Howard Kaikow: "Re: VBA code not deleting macros"
- In reply to: Malcolm Smith: "Re: Bookmarks"
- Next in thread: Malcolm Smith: "Re: Bookmarks"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|