Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using automation to work with word and i would like to use the code I
have to add bookmarks with a constant for the name then the page number following that. The code works for positioning perfectly when tested with an insertafter and add an "X" but gives me an error in my bookmark names. The code is like this - r.Bookmarks.Add "MeterNo & Selection.Information(wdActiveEndPageNumber)), vbInformation" I can use the same line of code in a messagebox and it works. This is the line used in the messagebox in word. MsgBox ("page no -" & Selection.Information(wdActiveEndPageNumber)), vbInformation I have tried to replace it like this r.Bookmarks.Add "MeterNo & mypage" and add the line mypage = Selection.Information(wdActiveEndPageNumber) and declare it as dim as variant and dim as string but neither approach works. can someone give me hand here Thanks Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Having a problem using a variable to add a 'name' | Excel Programming | |||
Having a problem using a variable to add a 'name' | Excel Programming | |||
Having a problem using a variable in | Excel Programming | |||
vba variable problem | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |