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.FpWebPublishFla gs.fpPublishAddToExistingWeb
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFla gs.fpPublishIncremental
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFla gs.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.OlI temType.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 2 1332
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" <Jo*********@fldfs.cmwrote in message
news:OW**************@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.FpWebPublishFla gs.fpPublishAddToExistingWeb
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFla gs.fpPublishIncremental
fpflags = fpflags +
Microsoft.Office.Interop.FrontPage.FpWebPublishFla gs.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.OlI temType.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?
"David Berry" <db****@mvps.orgwrote in message
news:O6**************@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" <Jo*********@fldfs.cmwrote in message
news:OW**************@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.FpWebPublishFl ags.fpPublishAddToExistingWeb fpflags = fpflags + Microsoft.Office.Interop.FrontPage.FpWebPublishFl ags.fpPublishIncremental fpflags = fpflags + Microsoft.Office.Interop.FrontPage.FpWebPublishFl ags.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.Ol ItemType.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: angelag |
last post by:
I am currently taking a college course in Visual Basic.Net and I am a
beginner.
I bought Visual Studio.Net 2003 to do my homework at home. I built my
first project and e-mailed it to myself at...
|
by: pix |
last post by:
Hello, I would like to start learning Visual Basic, and I was wondering if
there are any recomendations to any ebooks, or actual books for that
matter. I have my eye on this book by John Smiley,...
|
by: Orange Free |
last post by:
I want to create a program that will ask a user a series of questions
and then generate a Microsoft Word document whose content is dictated
by the answers. I am not a professional programmer, and...
|
by: Robert |
last post by:
Are visual basic.net and visual C#.net the same? which one is good to
learn? How are they different from C++?
Thank You
|
by: Pat |
last post by:
Hi,
Could you please suggest a good reference book for VB.NET? At present,
I am working on VB.NET project. and looking for a book that would be
useful as a reference book.
Also, I would...
|
by: Jesse Liberty |
last post by:
I am writing a new book on Visual Basic 2005, targeted at VB6 programmers,
and to some degree VB.NET 1.x programmers. I'd like to sign up a (limited)
number of volunteers to read the book and...
|
by: John.Miller |
last post by:
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...
|
by: nateastle |
last post by:
I have a simple assignment for school but am unsure where to go. The
assignment is to read in a text file, split out the words and say which
line each word appears in alphabetical order. I have the...
|
by: Master Programmer |
last post by:
An friend insider told me that VB is to be killled off within 18
months. I guess this makes sence now that C# is here. I believe it and
am actualy surprised they ever even included it in VS 2003 in...
|
by: Keith Russell |
last post by:
Hi, everyone.
I have done a variety of programming in the past in several
(mostly older) languages. I also worked for a couple of years
about 5 years ago programming in Visual C 6. I have...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |