The replacement for a sub is a void so in c# it would be
public void mySub()
{
//so something
}
Just call it be typing mySub if it's in the same class...
"Stefan" <sh****@steffsworld.ch> wrote in message
news:uf**************@TK2MSFTNGP12.phx.gbl...
| tnx a lot!
| do you also know how i can call a sub from c#?
| "Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
| in message news:eS**************@TK2MSFTNGP12.phx.gbl...
| > Stefan,
| >
| > You can not just set the Range property like this
| >
| > // Trying to set the text like this fails.
| > Bookmarks[1].Range = "Text";
| >
| > The reason for this is that in VB, you are actually setting the
| default
| > property on the Range object, which is Text (I believe). So, in your
| case,
| > you have to access the property manually, like this:
| >
| > // You need to set the property explicitly.
| > Bookmarks[1].Range.Text = "Text";
| >
| > Hope this helps.
| >
| >
| > --
| > - Nicholas Paldino [.NET/C# MVP]
| > -
ni**************@exisconsulting.com
| >
| > "Stefan" <sh****@steffsworld.ch> wrote in message
| > news:ej**************@TK2MSFTNGP12.phx.gbl...
| > > Hi
| > > How can I set the text for a bookmark in my worddocument?
| > > If I use the Range object I always get an error.
| > > tnx
| > > stefan
| > >
| > >
| >
| >
|
|