PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question

Reply

Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question

 
Thread Tools Rate Thread
Old 18-10-2006, 12:23 AM   #1
John.Miller
Guest
 
Posts: n/a
Default Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question


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


  Reply With Quote
Old 18-10-2006, 12:59 AM   #2
David Berry
Guest
 
Posts: n/a
Default Re: Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question

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.Miller@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
>



  Reply With Quote
Old 18-10-2006, 12:12 PM   #3
John.Miller
Guest
 
Posts: n/a
Default Re: Visual Basic Programming - Reference to fpPublishLogInTempDir uri - ADVANCED question

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?




"David Berry" <dberry@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.Miller@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
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off