
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Print variable value to msgbox
Hi,
I created a macro where i get a value from textbox to created variable. But if print it to msgbox i get an empty value though in variable overview i see that my variable get a value
what do i do wrong?
set Psum=ActiveDocument.GetSheetObject( "TX01" )
ActiveDocument.Variables("vPsum").SetContent Psum.GetText, true
suma=vPsum
msgbox("Sum is " &suma)
Thanks
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Store the value in a vb variable something like this:
set Psum=ActiveDocument.GetSheetObject( "TX01" )
strAmt = Psum.GetText
ActiveDocument.Variables("vPsum").SetContent strAmt, true
msgbox("Sum is " & strAmt)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Store the value in a vb variable something like this:
set Psum=ActiveDocument.GetSheetObject( "TX01" )
strAmt = Psum.GetText
ActiveDocument.Variables("vPsum").SetContent strAmt, true
msgbox("Sum is " & strAmt)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks it did the trick.
I wonder if it is possible to achieve the same result without using a variable vPsum just somehow get the object value straight in code
