Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question

J

John.Miller

I am writing an application inVisual Studio to ease our frontpage publishes.
I have the command to publish, but I need to attach the Publish log to an
email. Does anyone know how to get the publish log uri in order to attach
the email? Here is the code that I am using to publish:

Public Function PublishWeb(ByVal webname As String, ByVal sourceurl As
String, ByVal destinationurl As String, ByVal webauthor As String, ByVal
waemail As String, ByVal acct As String, ByVal acctpw As String)
'open sourceweb
Dim aw As Microsoft.Office.Interop.FrontPage.WebEx
Dim fp As New Microsoft.Office.Interop.FrontPage.Application()
Dim fpflags
aw = fp.Webs.Open(sourceurl, , ,
Microsoft.Office.Interop.FrontPage.FpWebOpenFlags.fpOpenInWindow)
'publish activeweb to destinationurl
fpflags =
Microsoft.Office.Interop.FrontPage.FpWebPublishFlags.fpPublishAddToExistingWeb
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFlags.fpPublishIncremental
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFlags.fpPublishLogInTempDir
aw.Publish(destinationurl, fpflags, acct, acctpw)
'send email to web author helpdesk and webdev stating completion
If Me.CheckBox1.Checked Then
Try
Dim smtpsndr As New System.Net.Mail.SmtpClient("xxx.xxx.xxx.xxx")
Dim mymsg As New System.Net.Mail.MailMessage(fromaddress, waemail)
smtpsndr.UseDefaultCredentials = True
smtpsndr.Timeout = 400
smtpsndr.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
mymsg.Body = "Publish of " & sourceurl & " to " & destinationurl & "
complete."
mymsg.CC.Add("webdevelopment ; helpdesk")
THIS IS WHERE WE ATTACH THE PUBLISH LOG -- if anyone know how to get the
path and filename.
mymsg.Subject = "Publish of " & webname & " complete."
smtpsndr.Send(mymsg)
mymsg.Dispose()
Catch ex As Exception
Try
Dim ol As New Microsoft.Office.Interop.Outlook.Application()
Dim mymsg As Microsoft.Office.Interop.Outlook.MailItem
mymsg =
ol.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
mymsg.Subject = "Publish of " & webname & " complete."
mymsg.To = webauthor
mymsg.CC = "myemail"
mymsg.Body = "Publish of " & sourceurl & " to " & destinationurl & "
complete."
mymsg.Send()
Catch ex1 As Exception
End Try
End Try
End If
'close web
aw.Close()
Return True
End Function
 
D

David Berry

you can find the current publish log in your Temp/FrontPage TempDir folder
(in XP, under Documents and Settings/yourid/Local Settings/Temp/FrontPage
TempDir) as publish_log.htm.

If you're using FP2003 in the File, Publish Site, Publishing tab you need to
turn on the Log option first
 
J

John.Miller

We are using fully patched FrontPage 2003, and if you notice in the code, I
am setting the fpPublishLogInTempDir flag. Everything is working as
planned, but it does not give a reference to the temp file anywhere that I
can find. The folder is not in the frontpage temp directory but the temp
internet directory in which the path changes frequently:

\Local Settings\Temporary Internet Files\Content.IE5\GH4RW3OJ\[1].htm

Anyone have any ideas?
 
Top