|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED questionI 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 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 Show quoteHide quote "John.Miller" <John.Mil***@fldfs.cm> wrote in message news:OWjPANk8GHA.4632@TK2MSFTNGP02.phx.gbl... >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 > 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? Show quoteHide quote "David Berry" <dbe***@mvps.org> wrote in message news:O6PlXhk8GHA.3740@TK2MSFTNGP05.phx.gbl... > 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 > > > "John.Miller" <John.Mil***@fldfs.cm> wrote in message > news:OWjPANk8GHA.4632@TK2MSFTNGP02.phx.gbl... >>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 >> > >
Recognizing if SQL Server is installed (and what version)
Q: Advice on threads open source .NET search engine? Bootstrapping .NET 2.0 Dispose problem/crash with maximized MDI child windows DateTime Field Passing parameters in VB 2005!! "Start external program" no longer works in VS2003 once 2.0 framework installed Uninstall a device Split monitor screen into multiple windows |
|||||||||||||||||||||||