Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Call Macro Function

I need read Bookmarks's informations to a table.

It because this application was made to do simulations, and to save the simulation I use Bookmarks.

The problem is to find which simulation was made for which customer (for example).

The I put a button to make the bookmarks with a few informations, like "customer's name", and I want get this information on load QV document.

I created a Macro Function:

Function getBookmarks

bookmarks = ActiveDocument.GetDocBookmarkNames

getBookmarks = join(bookmarks,";")

End Function

I call in QV Script:

LET vTotalBookmarks = getBookmarks();

But don't work on QV Script, only on application. The problem is in ActiveDocument.GetDocBookmarkNames, it's don't work on QV load.

There are a solution for this? [:'(]

Excuse my poor english.

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The developers had to disable "ActiveDocument" functions during the script reload, because of some collisions of macro and script functionality... If you don't have to load anything related to bookmarks in your load script, perhaps you can move your calculation of the variable into a later stage...

Oleg

Not applicable
Author

Thank you Oleg, I will try to do with variables.

Not applicable
Author

Hi! I read your discussion and maybe u can help me

I have this problem: I have a button, which execute a macro, and I need to get the name of the current bookmark (bookmark which is currently chosen) on the sheet, when the button is pressed. Maybe there is a way to do it? or another way... maybe there is a way to get the list of bookmarks, but with selections that correspond to each bookmark?

thanks for help.