EMailing Placebot

I'm working on a Quickplace and need some code to send an email from a Placebot that is run on Publish. The bit I can't figure out is how to get the full URL to embed as a link to the Page in the EMail.

I just need the code to get the URL of the page regardless of page type, room, plaetype name, etc.

Thanks
LVL 5
gbentleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sjef BosmanGroupware ConsultantCommented:
What might work (but don't shoot me, I'm the only piano player and I know nothing about QuickPlace):

    "http://www.yourserver.com/" + @WebDbName + "/0/" + @Text(@DocumentUniqueID)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gbentleyAuthor Commented:
THanks for the effort. I've worked it out.

I'll ask for this question to be deleted.
0
Sjef BosmanGroupware ConsultantCommented:
What did you do, so I know (my assistance was indeed useless)?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

gbentleyAuthor Commented:
This is my currect routine.

Function sGetURL As Variant
      Dim session As New NotesSession
      Dim dbRoom As NotesDatabase
      Dim docContext As NotesDocument
      Dim sURL As String
      Dim sTemp(1 To 1) As String
      Dim sFind(1 To 1) As String
      Dim sReplace(1 To 1) As String
      Dim vTemp As Variant
      
      Set dbRoom = session.CurrentDatabase
      Set docContext = session.DocumentContext
      
      sTemp(1) = Strleft(dbRoom.HttpURL,"/_") & "/" & dbRoom.FilePath
      sFind(1) = "\"
      sReplace(1) = "/"
      vTemp = Replace(sTemp, sFind, sReplace)
      
      sURL = vTemp(1)
      sURL = sURL & "/h_TOC/"
      sURL = sURL & docContext.UniversalID & "/?OpenDocument"
      
      sGetURL = sURL      
End Function

There is probably a better way, but it works in all my QPs which is the main issue!

Regards
0
Sjef BosmanGroupware ConsultantCommented:
That's just about the LotusScript equivalent of the Formula code I supplied above, with the only difference that you probably created an additional view h_TOC whereas I used the view 0 (zero), present in all Notes databases.

Don't know what to suggest...
0
gbentleyAuthor Commented:
In my defence, I have appended the "/?OpenDocument" bit without which it wasn't working.

If you want the points, let me know.
0
gbentleyAuthor Commented:
"h_TOC" is a standard view in all Quickplace DBs, and it's what is used in all the code I've been able to find. I wasn't aware of the /0 trick in Notes.
0
Sjef BosmanGroupware ConsultantCommented:
And I wasn't familiar with the h_TOC view :)  Strange that the OpenDocument-command is required here.

Anyway, it works, and I don't want to beg for points. In my defence, if you'd have reacted on my second post we might have found the solution earlier. I rest my case...
0
gbentleyAuthor Commented:
I actually missed the email from your post. Before I came here today, I thought I hadn't had any reponses. Comedy of errors really isn't it.

Regards
0
Sjef BosmanGroupware ConsultantCommented:
I hope you use Outlook/Exchange for mail...? Just to score points for Notes?
0
gbentleyAuthor Commented:
No, it was Notes!
0
gbentleyAuthor Commented:
I'll split the difference. You can have the points, but only a B!

Regards
0
Sjef BosmanGroupware ConsultantCommented:
I'll settle for that :) Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.