![]() |
|
#1
|
|||
|
|||
|
Good Morning, my code breaks at line 3 (excluding comments) of below code. It says it can't find the bookmark. I have checked that the bookmark is there and spelling etc is all correct. - I suspect that it may not open the header and therefore don't find the bookmark in the main document?
Anybody any idea why this would be. Code:
'Open Header
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext, Name:="2"
ActiveDocument.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
'Insert Data into Header
Selection.GoTo What:=wdGoToBookmark, Name:="BMQuoteNumberHeader"
Selection.TypeText Text:=txtQuoteNumber.Text
'Close Header
ActiveDocument.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Christine Auckland, NZ |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Repeating Bookmark Text | BECKTHOMO | Word | 1 | 03-27-2012 08:34 PM |
Word 2003 - IncludeText Does Not Include Bookmark Text if in a Form Text Control
|
skarden | Word | 1 | 12-12-2011 10:39 PM |
Insert a header name in the text (body)
|
bal-007 | Word | 3 | 11-25-2011 01:08 PM |
delete all bookmark text
|
hklein | Word VBA | 4 | 08-10-2011 04:33 AM |
VBA to insert Bookmark
|
rockwellsba | Word VBA | 2 | 05-31-2011 01:07 AM |